Openmoko Bug #1851: init.d/hwclock.sh and timezones
Openmoko Public Trac
bugs at docs.openmoko.org
Sat Aug 23 17:42:16 CEST 2008
#1851: init.d/hwclock.sh and timezones
----------------------+-----------------------------------------------------
Reporter: h.koenig | Owner: openmoko-devel
Type: defect | Status: new
Priority: normal | Milestone:
Component: unknown | Version:
Severity: normal | Keywords:
Blockedby: | Reproducible:
Blocking: |
----------------------+-----------------------------------------------------
I use Om 2008.8 with timezone MET (cp /usr/share/zoneinfo/Europe/Berlin
/etc/localtime).
after setting system time with ntpdate and reboot (ntpdate at startup
disabled) the system time is wrong (off bu 2 hours).
triggering atd after ntpdate sets the hwclock to UTC (checked both by
strace and by "pkill atd ; hwclock").
but after reboot, the hwclock shows UTC-2 resulting in wrong system time.
how I use the following patch and system time is always correct, even
after reboot:
--- 8< ------ 8< ------ 8< ------ 8< ------ 8< ------ 8< ------ 8< ------
8< ---
--- /etc/init.d/hwclock.sh.orig Sat Aug 23 17:31:43 2008
+++ /etc/init.d/hwclock.sh Sat Aug 23 17:32:36 2008
@@ -26,9 +26,9 @@
then
if [ -z "$TZ" ]
then
- hwclock --hctosys
+ hwclock --hctosys -u
else
- TZ="$TZ" hwclock --hctosys
+ TZ="$TZ" hwclock --hctosys -u
fi
fi
@@ -51,7 +51,7 @@
fi
if [ "$HWCLOCKACCESS" != no ]
then
- hwclock --systohc
+ hwclock --systohc -u
fi
if [ "$VERBOSE" != no ]
then
@@ -62,7 +62,7 @@
show)
if [ "$HWCLOCKACCESS" != no ]
then
- hwclock --show
+ hwclock --show -u
fi
;;
*)
--- 8< ------ 8< ------ 8< ------ 8< ------ 8< ------ 8< ------ 8< ------
8< ---
--
Ticket URL: <https://docs.openmoko.org/trac/ticket/1851>
docs.openmoko.org <http://docs.openmoko.org/trac/>
openmoko trac
More information about the buglog
mailing list