Ticket #1851 (closed defect: fixed)

Opened 6 years ago

Last modified 6 years ago

init.d/hwclock.sh and timezones

Reported by: h.koenig Owned by: openmoko-devel
Priority: normal Milestone:
Component: kernel Version:
Severity: normal Keywords:
Cc: Blocked By:
Blocking: Estimated Completion (week):
HasPatchForReview: PatchReviewResult:
Reproducible:

Description

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< ---

Change History

comment:1 Changed 6 years ago by john_lee

  • Status changed from new to closed
  • Resolution set to fixed
  • Component changed from unknown to System Software

fixed in c19005162ff4cbf74332c93a91da87030a120532 and 123b5957821eec957502639b4da1780376747ad4 in org.openmoko.dev branch.

Note: See TracTickets for help on using tickets.