Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
M
mkimage-profiles
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
1
Merge Requests
1
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Ximper Linux
mkimage-profiles
Commits
4500df77
Commit
4500df77
authored
Dec 23, 2023
by
Anton Midyukov
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
datetime: set TIME ZONE, use alterator-datetime-functions, update README
parent
bb72a973
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
19 additions
and
24 deletions
+19
-24
README
features.in/datetime/README
+9
-3
config.mk
features.in/datetime/config.mk
+2
-1
05-datetime
features.in/datetime/rootfs/image-scripts.d/05-datetime
+8
-20
No files found.
features.in/datetime/README
View file @
4500df77
=== features.in/datetime ===
Данная фича предназначена для настройки даты, времени, часовых поясов и т.д.
Данная фича предназначена для настройки часового пояса и переключения
хранения времени в BIOS между UTC (по Гринвичу) и местным временем.
Пока доступна только переменная TIME_UTC для выбора между местным временем и
UTC. Задайте TIME_UTC=0, чтобы переключиться на местное время.
* TIME_UTC
** Переключает хранение времени в BIOS с UTC (по Гринвичу) на местное время
** значение: 0 - местное; 1 - UTC
* TIME_ZONE
** Задаёт часовой пояс
** значение: формат регион/город из каталога /usr/share/zoneinfo/регион/город
features.in/datetime/config.mk
View file @
4500df77
use/datetime:
@$(call add_feature)
@$(call
try,TIME_UTC,1
)
@$(call
add,THE_PACKAGES,alterator-datetime-functions
)
@$(call xport,TIME_UTC)
@$(call xport,TIME_ZONE)
features.in/datetime/rootfs/image-scripts.d/05-datetime
View file @
4500df77
#!/bin/sh -efux
adjtime_file
=
/etc/adjtime
sysconfigclock_file
=
/etc/sysconfig/clock
TIME_UTC
=
"
${
GLOBAL_TIME_UTC
:-}
"
[
"
$TIME_UTC
"
=
0
]
||
TIME_UTC
=
1
in_zone
=
"
${
GLOBAL_TIME_ZONE
:-}
"
if
[
-s
"
$sysconfigclock_file
"
]
;
then
if
[
"
$TIME_UTC
"
=
1
]
;
then
sed
-i
's/^UTC=.*/UTC=true/'
"
$sysconfigclock_file
"
else
sed
-i
's/^UTC=.*/UTC=false/'
"
$sysconfigclock_file
"
fi
fi
.
alterator-datetime-functions
if
[
"
$TIME_UTC
"
=
1
]
;
then
ADJTIME
=
UTC
else
ADJTIME
=
LOCAL
if
[
-n
"
$TIME_UTC
"
]
;
then
[
"
$TIME_UTC
"
=
0
]
||
TIME_UTC
=
1
write_utc
"
$TIME_UTC
"
fi
cat
>
"
$adjtime_file
"
<<
EOF
0.0 0 0
0
$ADJTIME
EOF
if
[
-n
"
$in_zone
"
]
;
then
write_zone
fi
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment