You are not logged in.

#1 2013-08-14 20:39:59

rado3105
Member
Registered: 2011-10-09
Posts: 94

Arch show time 2 hours less than real time is

My local zone is Bratislava, I also tryed Prague.

sudo ntpdate ntp.nic.cz
13 Aug 20:48:09 ntpdate[15395]: adjust time server 217.31.205.226 offset -0.000292 sec

ls -l /etc/localtime
lrwxrwxrwx 1 root root 37 Aug  2 23:22 /etc/localtime -> /usr/share/zoneinfo/Europe/Bratislava

sudo timedatectl set-timezone Europe/Bratislava
[r-c@rc-x300 ~]$ ls -l /etc/localtime
lrwxrwxrwx 1 root root 37 Aug  2 23:22 /etc/localtime -> /usr/share/zoneinfo/Europe/Bratislava
[r-c@rc-x300 ~]$ sudo ntpdate ntp.nic.cz
13 Aug 21:14:20 ntpdate[28831]: adjust time server 217.31.205.226 offset -0.001226 sec

date +%Z
UTC
[r-c@rc-x300 ~]$ date +%z
+0000

sudo hwclock --debug && timedatectl status
hwclock from util-linux 2.23.1
Using /dev interface to clock.
Last drift adjustment done at 1375485866 seconds after 1969
Last calibration done at 1375485866 seconds after 1969
Hardware clock is on UTC time
Assuming hardware clock is kept in UTC time.
Waiting for clock tick...
...got clock tick
Time read from Hardware Clock: 2013/08/13 22:41:46
Hw clock time : 2013/08/13 22:41:46 = 1376433706 seconds since 1969
Tue 13 Aug 2013 10:41:46 PM UTC  -0.845350 seconds
      Local time: Tue 2013-08-13 22:41:46 UTC
  Universal time: Tue 2013-08-13 22:41:46 UTC
        RTC time: Tue 2013-08-13 22:41:46
        Timezone: Europe/Prague (UTC, +0000)
     NTP enabled: yes
NTP synchronized: yes
RTC in local TZ: no
      DST active: n/a


What is wrong?

Offline

#2 2013-08-14 21:17:34

ewaller
Administrator
From: Pasadena, CA
Registered: 2009-07-13
Posts: 12,718

Re: Arch show time 2 hours less than real time is

When you posed this, it was 13:40 PDT (GMT-7)
That means the UTC was 20:40.
Your hardware clock set to 22:41.  I would say it is set incorrectly.  It is to a timezone two hours ahead of where you are -- and it is also a couple minutes fast tongue


Nothing is too wonderful to be true, if it be consistent with the laws of nature -- Michael Faraday
Like you, I have no idea what you are doing, but I am pretty sure it is wrong...Jasonwryan
----
How to Ask Questions the Smart Way

Offline

#3 2013-08-14 21:33:40

WonderWoofy
Member
From: Los Gatos, CA
Registered: 2012-05-19
Posts: 8,412

Re: Arch show time 2 hours less than real time is

You should use code blocks when you have output like that.  It makes things much easier to read.  For information on how to use code blocks, you can follow the "BBCode" link on the bottom of the "Quick post" box, or you can simply hit the "Quote" button in the bottom right corner of this message to see how I made the boxes below.

<-- These are code blocks --> 
quote blocks wrote:

<-- These are quote blocks -->

(Use the quote button on the bottom of this post for those arrows to make sense)

Offline

#4 2013-08-14 22:13:59

rado3105
Member
Registered: 2011-10-09
Posts: 94

Re: Arch show time 2 hours less than real time is

I am now in Prague, time here is: 00:04.

The output of:
sudo hwclock --debug && timedatectl status

is:

hwclock from util-linux 2.23.2
Using /dev interface to clock.
Last drift adjustment done at 1375485866 seconds after 1969
Last calibration done at 1375485866 seconds after 1969
Hardware clock is on UTC time
Assuming hardware clock is kept in UTC time.
Waiting for clock tick...
...got clock tick
Time read from Hardware Clock: 2013/08/14 22:03:02
Hw clock time : 2013/08/14 22:03:02 = 1376517782 seconds since 1969
Wed 14 Aug 2013 10:03:02 PM UTC  -0.582243 seconds
      Local time: Wed 2013-08-14 22:03:02 UTC
  Universal time: Wed 2013-08-14 22:03:02 UTC
        RTC time: Wed 2013-08-14 22:03:02
        Timezone: Europe/Prague (UTC, +0000)
     NTP enabled: yes
NTP synchronized: yes
RTC in local TZ: no
      DST active: n/a

Prague is UTC + 1

Last edited by rado3105 (2013-08-14 22:15:18)

Offline

#5 2013-08-14 22:15:41

MoonSwan
Member
From: Great White North
Registered: 2008-01-23
Posts: 873

Re: Arch show time 2 hours less than real time is

Set your hwclock (in the bios) to the UTC time zone you're in and that should put things right, I think.


I'm torn apart between worlds. Basically, using vim in a highly visual environment with a lot of mouse features feels like soldering a lose wire to a motherboard with a Zippo and a needle, while working with ANY TEXT AT ALL with a "modern GUI" text editor feels like joining the London Philharmonic Orchestra with a Fisher-Price Laugh and Learn Magical Musical Mirror.  --Awebb

Offline

#6 2013-08-14 22:19:27

the_shiver
Member
From: Fortress Europe
Registered: 2013-03-27
Posts: 127

Re: Arch show time 2 hours less than real time is

rado3105 wrote:

I am now in Prague, time here is: 00:04.

Prague is UTC + 1

are you considering summer time? you should be utc+2

Offline

#7 2013-08-15 14:33:53

dif
Member
From: Stalowa Wola, Poland
Registered: 2009-12-22
Posts: 116

Re: Arch show time 2 hours less than real time is

Some advice from Poland.
I see that you have ntpd enabled. You can use it manually with the "-g" flag to adjust the big time difference.
See

man ntpd

Also, read https://wiki.archlinux.org/index.php/Be … ware_clock
and see UTC's

# hwclock --systohc --utc

and localtime's

# hwclock --systohc --localtime

This may give you some idea.
I dual-boot and I decided to set the localtime, not UTC.

Finally, time is/can be configured in your gnome/cinnamon/kde settings (Preferences->Calendar). Perhaps there's something misconfigured there.

Offline

Board footer

Powered by FluxBB