Author Topic: date/time incorrect  (Read 1587 times)

Offline 0dder0tter

  • Newbie
  • *
  • Posts: 9
date/time incorrect
« on: December 24, 2014, 03:36:04 pm »
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.

Offline pavroo

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 1456
    • SparkyLinux
Re: date/time incorrect
« Reply #1 on: December 24, 2014, 11:10:38 pm »
Can you try to reconfigure tzdata again and choose: US-> Eastern
Nothing is easy as it looks.

Offline 0dder0tter

  • Newbie
  • *
  • Posts: 9
Re: date/time incorrect
« Reply #2 on: December 24, 2014, 11:31:05 pm »
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.

Offline pavroo

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 1456
    • SparkyLinux
Re: date/time incorrect
« Reply #3 on: December 25, 2014, 12:43:22 am »
Is it OK now?
Looks similar as above.
Nothing is easy as it looks.

Offline 0dder0tter

  • Newbie
  • *
  • Posts: 9
Re: date/time incorrect
« Reply #4 on: December 25, 2014, 12:47:39 am »
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.

Offline pavroo

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 1456
    • SparkyLinux
Re: date/time incorrect
« Reply #5 on: December 25, 2014, 01:04:12 am »
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.
« Last Edit: December 25, 2014, 01:14:08 am by pavroo »
Nothing is easy as it looks.

Offline 0dder0tter

  • Newbie
  • *
  • Posts: 9
Re: date/time incorrect
« Reply #6 on: December 31, 2014, 01:40:23 am »
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.