Ticket #214 (closed defect: fixed)

Opened 3 years ago

Last modified 3 years ago

Timezone is lost across reboots

Reported by: carllobo Owned by: ainulindale
Priority: major Milestone:
Component: SHR Image Version:
Keywords: Cc:

Description

For me at least - I have my system clock set to UTC and my timezone set to IST using /etc/default/rcS and /etc/localtime - everytime my phone is rebooted it shows me weird times. To fix it I had to change line number 54 of /etc/init.d/hwclock.sh from
hwclock --systohc
to
TZ="$TZ" hwclock --systohc

Attachments

hwclock.sh Download (2.2 KB) - added by Kareema 3 years ago.
/etc/init.d/hwclock.sh

Change History

Changed 3 years ago by Kareema

/etc/init.d/hwclock.sh

comment:1 in reply to: ↑ description Changed 3 years ago by Kareema

Replying to carllobo:

I had the problem of incorrect system time after reboot, too. Seems like  http://docs.openmoko.org/trac/ticket/1851. My settings:

symlink: /etc/localtime -> /usr/share/zoneinfo/Europe/Berlin
/etc/default/rcS: UTC=yes

I could get the correct time after reboot using /etc/init.d/hwclock.sh from OM2008.12/testing. File is attached.

P.S.: It shouldn't be necessary to set TZ via /etc/default/rcS if you have set your local time using /etc/localtime.

comment:2 Changed 3 years ago by mrmoku

  • Status changed from new to closed
  • Resolution set to fixed

I just tried that with a current unstable image and timezone set to Europe/Berlin?.
Note: you have to install tzdate-europe to have that timezone installed.

After a reboot the time is still correct.

Note: See TracTickets for help on using tickets.