Welcome to SparkyLinux forums
Zapraszamy również na polsko-języczne Forum https://forum.linuxiarze.pl

date/time incorrect

Started by 0dder0tter, December 24, 2014, 03:36:04 PM

Previous topic - Next topic

0dder0tter

I'm having an issue with my system time that I've never run into with any other Linux distro. Hopefully someone can provide guidance.

During install I selected my timezone (America/New York, UTC -5) as I have in any other install. But my system clock has been showing UTC ever since. Here's some relevant output (when I ran these commands current local time was actually (roughly) 9:20 and current UTC was actually (roughly) 14:20):


mark@sparky:~$ sudo dpkg-reconfigure tzdata
[sudo] password for mark:

Current default time zone: 'America/New_York'
Local time is now:      Wed Dec 24 14:20:25 EST 2014.
Universal Time is now:  Wed Dec 24 19:20:25 UTC 2014.

mark@sparky:~$ date
Wed Dec 24 14:20:37 EST 2014
mark@sparky:~$ timedatectl
      Local time: Wed 2014-12-24 14:21:07 EST
  Universal time: Wed 2014-12-24 19:21:07 UTC
        RTC time: Wed 2014-12-24 14:21:07
       Time zone: America/New_York (EST, -0500)
     NTP enabled: no
NTP synchronized: no
RTC in local TZ: yes
      DST active: no
Last DST change: DST ended at
                  Sun 2014-11-02 01:59:59 EDT
                  Sun 2014-11-02 01:00:00 EST
Next DST change: DST begins (the clock jumps one hour forward) at
                  Sun 2015-03-08 01:59:59 EST
                  Sun 2015-03-08 03:00:00 EDT

Warning: The RTC is configured to maintain time in the local time zone. This
         mode is not fully supported and will create various problems with time
         zone changes and daylight saving time adjustments. If at all possible, use
         RTC in UTC by calling 'timedatectl set-local-rtc 0'.
mark@sparky:~$ timedatectl set-local-rtc 0
mark@sparky:~$ timedatectl
      Local time: Wed 2014-12-24 14:24:20 EST
  Universal time: Wed 2014-12-24 19:24:20 UTC
        RTC time: Wed 2014-12-24 19:24:20
       Time zone: America/New_York (EST, -0500)
     NTP enabled: no
NTP synchronized: no
RTC in local TZ: no
      DST active: no
Last DST change: DST ended at
                  Sun 2014-11-02 01:59:59 EDT
                  Sun 2014-11-02 01:00:00 EST
Next DST change: DST begins (the clock jumps one hour forward) at
                  Sun 2015-03-08 01:59:59 EST
                  Sun 2015-03-08 03:00:00 EDT
mark@sparky:~$ date
Wed Dec 24 14:24:43 EST 2014
mark@sparky:~$


It's worth mentioning that my BIOS is set to the correct UTC. Also note that I followed the suggestion of
timedatectl
and ran the command
timedatectl set-local-rtc 0
but am still getting UTC output as my local time.

Ideas?

mark
Linux is user friendly. It's just picky about who its friends are.

pavroo

Can you try to reconfigure tzdata again and choose: US-> Eastern
Nothing is easy as it looks. Danielle Steel
Join #sparkylinux.org at [url="//irc.libera.chat"]irc.libera.chat[/url]

0dder0tter

Certainly.

mark@sparky:~$ sudo dpkg-reconfigure tzdata 

Current default time zone: 'US/Eastern'
Local time is now:      Wed Dec 24 22:30:06 EST 2014.
Universal Time is now:  Thu Dec 25 03:30:06 UTC 2014.

mark@sparky:~$ date
Wed Dec 24 22:30:16 EST 2014
mark@sparky:~$
Linux is user friendly. It's just picky about who its friends are.

pavroo

Is it OK now?
Looks similar as above.
Nothing is easy as it looks. Danielle Steel
Join #sparkylinux.org at [url="//irc.libera.chat"]irc.libera.chat[/url]

0dder0tter

Nope, it's not OK now.

It is definitely similar, meaning it's just as wrong now as it was before. ;-)
Linux is user friendly. It's just picky about who its friends are.

pavroo

#5
1. Can you restart you machine and set the right time in BIOS/EFI?
2. Do you have other OSes installed on your hard drive - windows for example?
Why am I asking?
My older laptop had win and two Linux distros installed on a one drive.
Every time I worked on windows, it changed the system's clock and the time on my linux distros.
I used to set the time manually rather then from my time zone.
Just I am looking for a reason now. If something is wrong I used to check everything one by one starting from the source.
Nothing is easy as it looks. Danielle Steel
Join #sparkylinux.org at [url="//irc.libera.chat"]irc.libera.chat[/url]

0dder0tter

First of all, sorry for not replying to this thread sooner. Xmas and all ...

1. Can you restart you machine and set the right time in BIOS/EFI?

I had already done that, as mentioned in the original post.

2. Do you have other OSes installed on your hard drive - windows for example?

Nope. Just Sparky. Will probably be installing CentOS on a partition I set aside for that in the near(ish) future.

Time and date are now correct, but I can't explain why/how. I have a vague recollection of trying to fix the time after having drank more than my share of fine Xmas spirits.  ;) I have no idea, though, what I actually did. The next time I looked on the BIOS time settings they were way off. I set it to the correct UTC time which I'm sure I had checked before I started this thread, and after setting it correctly Sparky OS now has the correct local time.

My guess is that the BIOS time was wrong from the start and I just misread it when I first checked. Thanks for your assistance and I'm sorry I wasted your time.

mark
Linux is user friendly. It's just picky about who its friends are.

View the most recent posts on the forum