OSDN Git Service

Init: Setting system time back to utc
authorBilly <xiaobing.feng@windriver.com>
Thu, 14 Mar 2013 08:00:23 +0000 (16:00 +0800)
committerChih-Wei Huang <cwhuang@linux.org.tw>
Sun, 16 Jun 2013 08:06:07 +0000 (16:06 +0800)
commita3d25d1a296d7556809b45a92bc70127c173e604
tree9b970f3869e10703a1f3e14e2d9ec2e6198a4fb0
parentb2c88b62dd433c0434476def67121b0b4baa04d2
Init: Setting system time back to utc

Fix:
When rtc_local_time is enabled (ro.rtc_local_time = 1),
system time loaded from rtc should be local time too during boot.
Setting system time back to utc as soon as fast, which avoid programs
get confused about it.

For convert local time to utc, we need to get timezone information.
Android store timezone in property variable "persist.sys.timezone", and
its raw file stored on /data partition. So, the reasonalbe time when we
trigger sysclk should be after /data partition loaded and persist_props
loaded. We must add a new property variable for triggering sysclk if we
want to trigger it after load_persist_props commmand, which will make code
more complicated. Thinking about above, I add sysclk command on post-fs-data
section in init.bigcore.rc. At this point, partitions loaded, persist_props
not loaded yet. I get the timezone infromation through reading raw file
directly instead of call propert_get function

Issue: AXIA-2051
Change-Id: I0ff1d5932c5b1aaa8695129de44c06dba31cb443
Signed-off-by: Xiaobing Feng <xiaobing.feng@windriver.com>
init/builtins.c