LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > CentOS
User Name
Password
CentOS This forum is for the discussion of CentOS Linux. Note: This forum does not have any official participation.

Notices


Reply
  Search this Thread
Old 02-09-2018, 11:50 AM   #1
Basher52
Member
 
Registered: Mar 2004
Location: .SE
Distribution: Arch
Posts: 401

Rep: Reputation: 22
Angry Centos7, invalid offset for UTC for Sweden, says UTC+00


Hi all

I got a weird error that I don't seem to be able to fix.
I think I tried everything but I can't since it's still invalid.

I use UTC time and the server is in Sweden so the UTC-offset should be +01 but it's +00
The local time was wrong, as it used to be when I use UTC so all other times
I just skipped using UTC and set it myself and then used NTP to adjust it.
With this installation I figured I'm gonna do it right so I set to use UTC but later saw that
the local time was an hour off. After googling about it I found that the hwclock wasn't UTC.
I fixed that but still had problem with correct system time and after fiddling for some hours
trying to fix it I saw this error. I just now tried the GUI to check and yep, the offset for Sweden is corrupt.
Norways and Finlands is correct but Sweden has a +00-offset.
I thought the offset was like hardcoded into each land but it seems it ain't

How the Argh!! do I fix this?


//B52
 
Old 02-09-2018, 11:54 AM   #2
Basher52
Member
 
Registered: Mar 2004
Location: .SE
Distribution: Arch
Posts: 401

Original Poster
Rep: Reputation: 22
Some info:

Code:
[root@webserver01 /]# timedatectl
      Local time: Fri 2018-02-09 17:53:06 UTC
  Universal time: Fri 2018-02-09 17:53:06 UTC
        RTC time: Fri 2018-02-09 17:53:06
       Time zone: Europe/Stockholm (UTC, +0000)
     NTP enabled: no
NTP synchronized: yes
 RTC in local TZ: no
      DST active: n/a
[root@webserver01 /]#
Code:
[root@webserver01 /]# hwclock --debug
hwclock from util-linux 2.23.2
Using /dev interface to clock.
Last drift adjustment done at 1518127556 seconds after 1969
Last calibration done at 1518127556 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: 2018/02/09 17:53:13
Hw clock time : 2018/02/09 17:53:13 = 1518198793 seconds since 1969
Fri 09 Feb 2018 05:53:13 PM UTC  -0.577709 seconds

Last edited by Basher52; 02-09-2018 at 11:55 AM.
 
Old 02-09-2018, 03:54 PM   #3
michaelk
Moderator
 
Registered: Aug 2002
Posts: 25,727

Rep: Reputation: 5919Reputation: 5919Reputation: 5919Reputation: 5919Reputation: 5919Reputation: 5919Reputation: 5919Reputation: 5919Reputation: 5919Reputation: 5919Reputation: 5919
Code:
      Local time: Fri 2018-02-09 17:53:06 UTC
  Universal time: Fri 2018-02-09 17:53:06 UTC
        RTC time: Fri 2018-02-09 17:53:06
       Time zone: Europe/Stockholm (UTC, +0000)
Both local time and the time zone data show UTC versus CET.

What does the output of /etc/localtime show?

zdump -v /etc/localtime | grep 2018
 
Old 02-09-2018, 04:03 PM   #4
Basher52
Member
 
Registered: Mar 2004
Location: .SE
Distribution: Arch
Posts: 401

Original Poster
Rep: Reputation: 22
Code:
zdump -v /etc/localtime | grep 2018
didn't show anything 'cos the
Code:
zdump -v /etc/localtime
gives me
Code:
[root@webserver01 private]# zdump -v /etc/localtime
/etc/localtime  -9223372036854775808 = NULL
/etc/localtime  -9223372036854689408 = NULL
/etc/localtime  9223372036854689407 = NULL
/etc/localtime  9223372036854775807 = NULL
There's no 2018 in that so grep won't find '2018'
 
Old 02-09-2018, 04:41 PM   #5
michaelk
Moderator
 
Registered: Aug 2002
Posts: 25,727

Rep: Reputation: 5919Reputation: 5919Reputation: 5919Reputation: 5919Reputation: 5919Reputation: 5919Reputation: 5919Reputation: 5919Reputation: 5919Reputation: 5919Reputation: 5919
What happens when you run the command

timedatectl set-timezone Europe/Stockholm

What does the output of the date command show?
 
Old 02-09-2018, 05:05 PM   #6
Basher52
Member
 
Registered: Mar 2004
Location: .SE
Distribution: Arch
Posts: 401

Original Poster
Rep: Reputation: 22
Code:
[root@webserver01 private]# timedatectl set-timezone Europe/Stockholm
Code:
[root@webserver01 private]# date
Fri Feb  9 23:04:02 UTC 2018
but the time here is now 00:04
 
Old 02-09-2018, 05:09 PM   #7
Basher52
Member
 
Registered: Mar 2004
Location: .SE
Distribution: Arch
Posts: 401

Original Poster
Rep: Reputation: 22
I think I tried everything, when I set the UTC-time correct and then set the local time (which I thought I could do) with
Code:
timedatectl set-time
everything changes. I have NO CLUE what to do.
 
Old 02-09-2018, 05:20 PM   #8
michaelk
Moderator
 
Registered: Aug 2002
Posts: 25,727

Rep: Reputation: 5919Reputation: 5919Reputation: 5919Reputation: 5919Reputation: 5919Reputation: 5919Reputation: 5919Reputation: 5919Reputation: 5919Reputation: 5919Reputation: 5919
Interesting problem. I don't have a clue either.

I forgot to ask if the following shows the same information as /etc/localtime.
zdump -v /usr/share/zoneinfo/Europe/Stockholm
 
Old 02-09-2018, 05:31 PM   #9
Basher52
Member
 
Registered: Mar 2004
Location: .SE
Distribution: Arch
Posts: 401

Original Poster
Rep: Reputation: 22
I'm not sure how to 'list' /etc/locatime but I did a 'cat' on it... so...

Code:
[root@webserver01 private]# zdump -v /usr/share/zoneinfo/Europe/Stockholm
/usr/share/zoneinfo/Europe/Stockholm  -9223372036854775808 = NULL
/usr/share/zoneinfo/Europe/Stockholm  -9223372036854689408 = NULL
/usr/share/zoneinfo/Europe/Stockholm  9223372036854689407 = NULL
/usr/share/zoneinfo/Europe/Stockholm  9223372036854775807 = NULL
[root@webserver01 private]#
Code:
[root@webserver01 private]# cat /etc/localtime
TZif2UTCTZif2UTC
UTC0
 
Old 02-09-2018, 05:36 PM   #10
Basher52
Member
 
Registered: Mar 2004
Location: .SE
Distribution: Arch
Posts: 401

Original Poster
Rep: Reputation: 22
This thing sure eludes me
I can't count how many hours I've spent trying to fix this. I just wanted to do it the "correct" way
but I'm starting to think that a reinstall is the only thing that can fix it.

"Weeee", just a "few" hours more to install it all, Sigh!

I'll wait a little longer in case someone that know sees this and answers.
 
Old 02-09-2018, 06:16 PM   #11
michaelk
Moderator
 
Registered: Aug 2002
Posts: 25,727

Rep: Reputation: 5919Reputation: 5919Reputation: 5919Reputation: 5919Reputation: 5919Reputation: 5919Reputation: 5919Reputation: 5919Reputation: 5919Reputation: 5919Reputation: 5919
There was a recent update that included a new tzdata base. If you have not updated recently that could fix problem.
 
1 members found this post helpful.
Old 02-09-2018, 06:41 PM   #12
Basher52
Member
 
Registered: Mar 2004
Location: .SE
Distribution: Arch
Posts: 401

Original Poster
Rep: Reputation: 22
well there sure are some days ago so...

I did that and got an error, OF COURSE
I got the repo from lux added so that might be the problem. lux is for ulogd.

got this:
Code:
--> Processing Dependency: tinycdb for package: 2:postfix-2.10.1-6.el7.lux.1.x86_64
--> Processing Dependency: libcdb.so.1()(64bit) for package: 2:postfix-2.10.1-6.el7.lux.1.x86_64
--> Finished Dependency Resolution
Error: Package: 2:postfix-2.10.1-6.el7.lux.1.x86_64 (lux)
           Requires: tinycdb
Error: Package: 2:postfix-2.10.1-6.el7.lux.1.x86_64 (lux)
           Requires: libcdb.so.1()(64bit)
 You could try using --skip-broken to work around the problem
 You could try running: rpm -Va --nofiles --nodigest
I think I can skip that for now, like use --skip-broken and later fix this for this particular lux-repo, am I right?

I did see this in the updates to be though:
Code:
...
---> Package tzdata.noarch 0:2017b-1.el7 will be updated
---> Package tzdata.noarch 0:2018c-1.el7 will be an update
---> Package tzdata-java.noarch 0:2017b-1.el7 will be updated
---> Package tzdata-java.noarch 0:2018c-1.el7 will be an update
...
so if this is what you mean, I sure need to get that installed and try again but now this above error showed up.
So what do I do now............




////////////////
For fun I used to say and still do about how I am (and it kinda suits me)
"I'm not a pessimist, I'm an optimistic pessimist.... I know for SURE!!! I'm gonna f**k it up"
 
Old 02-09-2018, 06:46 PM   #13
michaelk
Moderator
 
Registered: Aug 2002
Posts: 25,727

Rep: Reputation: 5919Reputation: 5919Reputation: 5919Reputation: 5919Reputation: 5919Reputation: 5919Reputation: 5919Reputation: 5919Reputation: 5919Reputation: 5919Reputation: 5919
using yum --skip-broken update will not update those broken packages. You could also disable the lux repo.

Correct tzdata is the timezone database.

Last edited by michaelk; 02-09-2018 at 06:48 PM.
 
1 members found this post helpful.
Old 02-09-2018, 06:55 PM   #14
Basher52
Member
 
Registered: Mar 2004
Location: .SE
Distribution: Arch
Posts: 401

Original Poster
Rep: Reputation: 22
OK, I'll disable the lux repo and test that......
 
Old 02-09-2018, 10:10 PM   #15
Basher52
Member
 
Registered: Mar 2004
Location: .SE
Distribution: Arch
Posts: 401

Original Poster
Rep: Reputation: 22
Yep, seemed to fix my error, Thanks michaelk, you're sure 'da man'
wow, I did not see that coming, a bug big as this?!? dang.
I haven't read anything about the update but it sure seemed to fix my problem though.

Last edited by Basher52; 02-10-2018 at 08:16 AM.
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
[SOLVED] -12 UTC TimeZone ugjka Arch 2 01-01-2016 11:23 AM
GPS record failed checksum: $GPRMC invalid fixtime: [979974216] 2001/01/20 07: UTC Aquarius_Girl General 3 02-02-2013 08:35 AM
Is any benefit of UTC? sluge Linux - Software 5 03-29-2012 08:55 PM
Re: UTC Time unixfreak Linux - Newbie 2 08-30-2004 02:09 PM
my clock is UTC??? mathfeel Linux - General 2 08-16-2002 08:42 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > CentOS

All times are GMT -5. The time now is 01:50 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration