[arch-general] time zone problem with systemd

Brandon Watkins bwat47 at gmail.com
Sat Aug 18 09:42:29 EDT 2012


On Fri, Aug 17, 2012 at 11:20 PM, Shridhar Daithankar <
ghodechhap at ghodechhap.net> wrote:

> Hello,
>
> I am having trouble with time on a machine when I boot with systemd. The
> clock
> is ahead of actual time by the value of time zone offset.
>
> Funny thing is when I boot with initscripts, time is reported correctly.
>
> I have this problem on one machine but other machine works correctly. The
> only
> difference I can spot is hwclock reports local time, on the machine where
> time
> is correct.
>
> Whats the magic that I am missing?
>
> with systemd
> ---------------------------
> [shridhar at waman ~]$ date
> Sat Aug 18 14:23:16 IST 2012
>
> [shridhar at waman ~]$ cat /etc/timezone
> Asia/Kolkata
>
> [shridhar at waman ~]$ ls -al /etc/localtime
> lrwxrwxrwx 1 root root 32 Aug 11 02:02 /etc/localtime ->
> /usr/share/zoneinfo/Asia/Kolkata
>
> [shridhar at waman ~]$ cat /etc/adjtime
> 0.000000 0 0.000000
> 0
> UTC
>
> [shridhar at waman ~]$ grep -i hwclock /etc/rc.conf
> DAEMONS=(hwclock syslog-ng dbus network crond @cpufreq @openntpd @dnsmasq
> @sshd @laptop-mode kdm)
>
> [shridhar at waman ~]$ grep -i hardware /etc/rc.conf
>
> [root at waman shridhar]# hwclock
> Sat 18 Aug 2012 02:26:28 PM IST  -0.110228 seconds
>
> [root at waman shridhar]# hwclock -u
> Sat 18 Aug 2012 02:29:35 PM IST  -0.375925 seconds
> ---------------------------
>
> with initscripts
> ---------------------------
> [shridhar at waman ~]$ date
> Sat Aug 18 08:44:09 IST 2012
>
> [root at waman shridhar]# hwclock
> Sat 18 Aug 2012 02:33:05 PM IST  -0.146140 seconds
>
> [root at waman shridhar]# hwclock -u
> Sat 18 Aug 2012 02:33:10 PM IST  -0.438390 seconds
>
> ---------------------------
>
>
>
> --
> Regards
>  Shridhar
>
Make sure you symlink your timezone to /etc/localtime as described here:
https://wiki.archlinux.org/index.php/Beginner%27s_Guide#Timezone


More information about the arch-general mailing list