Revert "resolved: apply epoch to system time from PID 1" 59/182759/1 accepted/tizen/unified/20180704.154010 submit/tizen/20180704.010647
authorHyotaek Shim <hyotaek.shim@samsung.com>
Wed, 27 Jun 2018 10:47:30 +0000 (19:47 +0900)
committerHyotaek Shim <hyotaek.shim@samsung.com>
Thu, 28 Jun 2018 00:25:50 +0000 (00:25 +0000)
commit3862254fbb98c8f7e04d4b93fecf1a497b6aabd9
tree82815c171da9b79ce0c30a6fa4006a2eb97dc199
parentb8c2be63386b6200027faf61acb1791e663884c0
Revert "resolved: apply epoch to system time from PID 1"

This reverts commit 021dd87bc055a5bfb2dcef83fc868fe24648b959.

In Tizen Watch products, users can set the RTC as they want, even to the past.
Here, it has been observed that the system clock is reset every booting.

For instance,
1) After a boot, Kernel RTC is 2018-01-02.

2) Since the system clock initialized by RTC is 2018-01-02 is less than 2018-06-27 (TIME_EPOCH_USEC),
Systemd resets the system clock as TIME_EPOCH_USEC, but does not modify RTC.
Although the system clock shown to users is not an intended value, the time goes by to 2018-06-28.

3) After another reboot, the system clock is restored to 2018-06-27 (TIME_EPOCH_USEC)
because RTC is still less than TIME_EPOCH_USEC.

Change-Id: Ib2c61e9b1fd9d4b0d33f99868dda1daaec21878d
Signed-off-by: Hyotaek Shim <hyotaek.shim@samsung.com>
src/basic/clock-util.c
src/basic/clock-util.h
src/core/main.c