Skip to content
Snippets Groups Projects
Verified Commit bb9f7201 authored by Clayton Craft's avatar Clayton Craft :speech_balloon:
Browse files

Support busybox 'date' command

BB's `date` doesn't support the long form of this arg (`--utc`), only
the short form, while coreutils supports both versions. By using the
short form swclock-offset can support both versions of `date`
parent 6a4e4dce
Branches master
Tags 0.2.5
No related merge requests found
Pipeline #216563 passed
......@@ -33,4 +33,4 @@ offset_epoch=$(cat $offset_file)
swclock_epoch=$((hwclock_epoch + offset_epoch))
# set system time, dump output
date --utc --set=@$swclock_epoch > /dev/null
date -u --set=@$swclock_epoch > /dev/null
......@@ -26,7 +26,7 @@ if [ ! -d $offset_directory ]; then
fi
# calculate offset
swclock_epoch=$(date --utc +%s)
swclock_epoch=$(date -u +%s)
hwclock_epoch=$(cat $rtc_sys_node)
offset_epoch=$((swclock_epoch - hwclock_epoch))
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment