rtc_hctosys expects RTCs in UTC (doc)
authorDavid Brownell <david-b@pacbell.net>
Thu, 15 Nov 2007 00:58:29 +0000 (16:58 -0800)
committerLinus Torvalds <torvalds@woody.linux-foundation.org>
Thu, 15 Nov 2007 02:45:36 +0000 (18:45 -0800)
The RTC "hctosys" mechanism expects that RTC clock will use UTC, not local
time (e.g.  PST).  Say so in Kconfig and in the kernel message.

(Strictly speaking, the RTC clock should be tracking the POSIX epoch.  That's
not worth going into here.  Goofing timezones means clocks are wrong by many
hours; the POSIX-v-UTC differences just cost seconds.)

Signed-off-by: David Brownell <dbrownell@users.sourceforge.net>
Acked-by: Alessandro Zummo <a.zummo@towertech.it>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
drivers/rtc/Kconfig
drivers/rtc/hctosys.c

index cbde770eb121062fcfa67f8dd562f827814cacc1..7958635f12cc306ddb392927af9735d2c7d1a3dc 100644 (file)
@@ -36,7 +36,9 @@ config RTC_HCTOSYS_DEVICE
        help
          The RTC device that will be used to (re)initialize the system
          clock, usually rtc0.  Initialization is done when the system
-         starts up, and when it resumes from a low power state.
+         starts up, and when it resumes from a low power state.  This
+         device should record time in UTC, since the kernel won't do
+         timezone correction.
 
          The driver for this RTC device must be loaded before late_initcall
          functions run, so it must usually be statically linked.
index 178527252c6a6d04c8dbd55c1ca1ab22aa938e69..33c0e98243eef9ab397b840c1f8265c5c9e31baf 100644 (file)
@@ -47,8 +47,8 @@ static int __init rtc_hctosys(void)
                        do_settimeofday(&tv);
 
                        dev_info(rtc->dev.parent,
-                               "setting the system clock to "
-                               "%d-%02d-%02d %02d:%02d:%02d (%u)\n",
+                               "setting system clock to "
+                               "%d-%02d-%02d %02d:%02d:%02d UTC (%u)\n",
                                tm.tm_year + 1900, tm.tm_mon + 1, tm.tm_mday,
                                tm.tm_hour, tm.tm_min, tm.tm_sec,
                                (unsigned int) tv.tv_sec);