[LEDE-DEV] [PATCH] base-files: sysfixtime: Allow system time in local timezones

Petr Štetiar ynezz at true.cz
Wed Oct 19 12:38:53 PDT 2016


Felix Fietkau <nbd at nbd.name> [2016-10-18 23:25:40]:

> On 2016-10-18 23:11, Petr Štetiar wrote:
> > Currently we're forced to have system time in the UTC timezone as
> > hardware clock, mainly because kernel expects in rtc_hctosys(), that RTC
> > time is held in UTC timezone.
> > 
> > With this patch one can now have local system time for example in CEST
> > timezone and RTC time still in UTC with boolean config option `rtc_utc`.
> > 
> Why?

Would this be a better commit message?

I'm using devices which have battery backed RTC. Sometime I need to use local
timezone for system time as for example CEST(UTC+2) timezone.

The problem is, that as soon as I enable CEST timezone for system time, the
battery backed RTC clock gets screwed with every graceful reboot as the
sysfixtime script writes system time to RTC in system's CEST timezone instead
in UTC. Linux kernel on next reboot expects time from RTC to be in UTC, but
the time is there already in CEST resulting in screwed clock.

-- ynezz



More information about the Lede-dev mailing list