You are not logged in.
Pages: 1
Hi,
I've switched to systemd and have problem always with my time zone
I'm currently in Tehran so according to the https://wiki.archlinux.org/index.php/Rc.conf I set up:
"Warning: This setting is now configured by the /etc/localtime symlink."
11:32:38 root@baboonsony:/home/papio# ls -la /etc/localtime
lrwxrwxrwx 1 root root 37 Dec 8 08:59 /etc/localtime -> /usr/share/zoneinfo/posix/Asia/Tehranevery time I start linux it is 3.5 hours ahead (12600 sec)
when I use ntp command it sets up it correctly:
14:54:14 root@baboonsony:/home/papio# /usr/bin/ntpdate pool.ntp.org
17 Jan 11:26:55 ntpdate[1875]: step time server 62.116.162.126 offset -12593.680916 secand then everything is OK
11:37:26 root@baboonsony:/home/papio# timedatectl status
Local time: Thu 2013-01-17 11:37:55 IRST
Universal time: Thu 2013-01-17 08:07:55 UTC
RTC time: Thu 2013-01-17 11:37:49
Timezone: posix/Asia/Tehran (IRST, +0330)
NTP enabled: no
NTP synchronized: no
RTC in local TZ: no
DST active: no
Last DST change: DST ended at
Thu 2012-09-20 23:59:59 IRDT
Thu 2012-09-20 23:00:00 IRST
Next DST change: DST begins (the clock jumps one hour forward) at
Thu 2013-03-21 23:59:59 IRST
Fri 2013-03-22 01:00:00 IRDThow to make sure my time is correctly set up just after boot without ntpdate command?
I have to use localtime as I'm using win7 on the other partition co my /etc/adjtime looks like:
15:18:14 papio@baboonsony:~$ cat /etc/adjtime
localtimeLast edited by zyghom (2013-01-17 10:21:27)
Zygfryd Homonto
Offline
Offline
add the following if not
server 0.pool.ntp.org
server 1.pool.ntp.org
server 2.pool.ntp.org
server 3.pool.ntp.orgalso I would recommend you follow the wiki article to move to pure systemd
Last edited by t0m5k1 (2013-01-17 08:49:16)
Offline
hwclock --localtime
Why are you using /usr/share/zoneinfo/posix/Asia/Tehran instead of /usr/share/zoneinfo/Asia/Tehran?
You don't HAVE to use localtime, you can set Windows to use UTC instead.
t0m5k1, his issue has nothing to do with NTP.
Last edited by Scimmia (2013-01-17 08:56:42)
Offline
hwclock --localtime
t0m5k1, his issue has nothing to do with NTP.
I had the exact same issue when I moved to arch because ntp.conf had no servers listed!
what made me think it may help is that he call's the server directly & all is ok, which to me could indicate the file has no servers listed!
Offline
Scimmia wrote:hwclock --localtime
t0m5k1, his issue has nothing to do with NTP.
I had the exact same issue when I moved to arch because ntp.conf had no servers listed!
what made me think it may help is that he call's the server directly & all is ok, which to me could indicate the file has no servers listed!
But that is still just a band-aid. The system should be able to get the clock very close without using NTP at all. If you have to use NTP to get a correct time, your system has other issues.
Offline
I have changed it to:
16:00:31 root@baboonsony:/home/papio# ls -la /etc/localtime
lrwxrwxrwx 1 root root 31 Jan 17 12:27 /etc/localtime -> /usr/share/zoneinfo/Asia/Tehranbut just after reboot it is the same 3.5h until I run ntpdate again
it has nothing to do with ntp - I agree
but I have no idea what else to change
Zygfryd Homonto
Offline
As I said, try hwclock --localtime.
Right now, your system is reading the clock then adding the timezone offset, so it thinks your RTC is in UTC. The above command should tell it otherwise.
Offline
16:11:43 root@baboonsony:/home/papio# hwclock --localtime
Thu 17 Jan 2013 12:41:45 PM IRST -0.188093 seconds
16:11:58 root@baboonsony:/home/papio# /usr/bin/ntpdate pool.ntp.org
17 Jan 12:42:18 ntpdate[1264]: step time server 5.9.156.53 offset -12593.654630 sec
12:42:18 root@baboonsony:/home/papio# hwclock --localtime
Thu 17 Jan 2013 12:42:16 PM IRST -0.641174 seconds
12:42:22 root@baboonsony:/home/papio#no changes, I still have the same problem: without ntpdate command the computer is using UTC
after ntpdate command the computer changes to IRST
Zygfryd Homonto
Offline
Did you reboot after running it? Could we get a timedatectl status immediately after boot?
Last edited by Scimmia (2013-01-17 09:23:03)
Offline
yes ;-)
Zygfryd Homonto
Offline
How about trying timedatectl set-local-rtc on
Last edited by Scimmia (2013-01-17 09:27:41)
Offline
executed, no changes at all ;-(
16:31:57 root@baboonsony:/home/papio# timedatectl set-local-rtc ON
16:32:01 root@baboonsony:/home/papio# cat /etc/adjtime
localtime
16:32:06 root@baboonsony:/home/papio# ls -la /etc/localtime
lrwxrwxrwx 1 root root 31 Jan 17 12:27 /etc/localtime -> /usr/share/zoneinfo/Asia/Tehran
16:32:14 root@baboonsony:/home/papio# hwclock --localtime
Thu 17 Jan 2013 01:02:30 PM IRST -0.188010 seconds
16:32:29 root@baboonsony:/home/papio# /usr/bin/ntpdate pool.ntp.org
17 Jan 13:04:18 ntpdate[1453]: step time server 85.12.35.12 offset -12593.660321 sec
13:04:18 root@baboonsony:/home/papio# Zygfryd Homonto
Offline
Maybe there's something wrong with your /etc/adjtime file? Remove it and run hwclock --localtime again to regenerate it.
Starting to look for long shots here.
Offline
16:41:23 root@baboonsony:/home/papio# date
Thu Jan 17 16:41:33 IRST 2013
16:41:33 root@baboonsony:/home/papio# /usr/bin/ntpdate pool.ntp.org
17 Jan 13:11:54 ntpdate[1282]: step time server 192.34.57.129 offset -12593.603994 sec
13:11:54 root@baboonsony:/home/papio# date
Thu Jan 17 13:11:56 IRST 2013Zygfryd Homonto
Offline
Well I'm out of ideas, other than just switching the RTC to UTC.
Offline
13:18:36 root@baboonsony:/home/papio# hwclock --localtime
Thu 17 Jan 2013 01:18:35 PM IRST -0.094272 seconds
13:18:41 root@baboonsony:/home/papio# cat /etc/adjtime
cat: /etc/adjtime: No such file or directorythe command above DOES NOT regenerate/recreate this file
Zygfryd Homonto
Offline
And that's part of the problem. If no adjtime file exists, the system assumes UTC and the file you had was invalid. Maybe hwclock --systohc ---localtime will create it?
Last edited by Scimmia (2013-01-17 10:15:15)
Offline
I have found the issue - as Scimmia says - problem with wrong /etc/adjtime file
I found the proper command to recreate it:
13:46:59 root@baboonsony:/etc/cron.hourly# timedatectl set-local-rtc 1
13:47:04 root@baboonsony:/etc/cron.hourly# cat /etc/adjtime
0.0 0 0
0
LOCALnow it is ok
thank you guys!
Zygfryd Homonto
Offline
Pages: 1