Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!

Bug 673170

Summary: app-eselect/eselect-timezone - GMT seems wrong
Product: Gentoo Linux Reporter: zeomebuch
Component: Current packagesAssignee: Christoph Junghans (RETIRED) <junghans>
Status: RESOLVED INVALID    
Severity: normal    
Priority: Normal    
Version: unspecified   
Hardware: AMD64   
OS: Linux   
Whiteboard:
Package list:
Runtime testing required: ---
Attachments: emerge --info

Description zeomebuch 2018-12-15 10:42:31 UTC
Created attachment 557794 [details]
emerge --info

Choosing GTM + 1:

~ $ sudo eselect timezone set 394
~ $ date
Sat Dec 15 09:47:17 -01 2018

whilst the real GTM + 1 time was 10:47:17 at this point


Choosing GTM + 0:

~ $ sudo eselect timezone set 392
~ $ date
Sat Dec 15 10:52:16 GMT 2018 which in reality is GTM +1

whilst the ream GTM + 0 time was 09:47:17 at this point



I kept trying with other values, like 404, which is GTM + 2, and the result was as expected: "date" returns GTM - 2. 

1. GTM + 0 is wrong by an offset of +1 hour
2. Choosing an option which adds time to the Greenwich Mean Time does exactly the opposite. The GTM time gets subtracted
Comment 1 Jeroen Roovers (RETIRED) gentoo-dev 2018-12-15 14:15:09 UTC
Assuming you meant GMT not GTM.
Comment 2 Christoph Junghans (RETIRED) gentoo-dev 2018-12-16 00:50:15 UTC
(In reply to zeomebuch from comment #0)
> Created attachment 557794 [details]
> emerge --info
> 
> Choosing GTM + 1:
> 
> ~ $ sudo eselect timezone set 394
> ~ $ date
> Sat Dec 15 09:47:17 -01 2018
> 
> whilst the real GTM + 1 time was 10:47:17 at this point
> 
> 
> Choosing GTM + 0:
> 
> ~ $ sudo eselect timezone set 392
> ~ $ date
> Sat Dec 15 10:52:16 GMT 2018 which in reality is GTM +1
> 
> whilst the ream GTM + 0 time was 09:47:17 at this point
> 
> 
> 
> I kept trying with other values, like 404, which is GTM + 2, and the result
> was as expected: "date" returns GTM - 2. 
> 
> 1. GTM + 0 is wrong by an offset of +1 hour
> 2. Choosing an option which adds time to the Greenwich Mean Time does
> exactly the opposite. The GTM time gets subtracted

To ensure it is not a problem in eselect-timezone, could you try to set the timezone manually? (see https://wiki.gentoo.org/wiki/Handbook:AMD64/Installation/Base#Timezone)
Comment 3 zeomebuch 2018-12-16 11:40:01 UTC
(In reply to Jeroen Roovers from comment #1)
> Assuming you meant GMT not GTM.

you are completely right.
Comment 4 zeomebuch 2018-12-16 11:51:17 UTC
(In reply to Christoph Junghans from comment #2)
> (In reply to zeomebuch from comment #0)
> > Created attachment 557794 [details]
> > emerge --info
> > 
> > Choosing GTM + 1:
> > 
> > ~ $ sudo eselect timezone set 394
> > ~ $ date
> > Sat Dec 15 09:47:17 -01 2018
> > 
> > whilst the real GTM + 1 time was 10:47:17 at this point
> > 
> > 
> > Choosing GTM + 0:
> > 
> > ~ $ sudo eselect timezone set 392
> > ~ $ date
> > Sat Dec 15 10:52:16 GMT 2018 which in reality is GTM +1
> > 
> > whilst the ream GTM + 0 time was 09:47:17 at this point
> > 
> > 
> > 
> > I kept trying with other values, like 404, which is GTM + 2, and the result
> > was as expected: "date" returns GTM - 2. 
> > 
> > 1. GTM + 0 is wrong by an offset of +1 hour
> > 2. Choosing an option which adds time to the Greenwich Mean Time does
> > exactly the opposite. The GTM time gets subtracted
> 
> To ensure it is not a problem in eselect-timezone, could you try to set the
> timezone manually? (see
> https://wiki.gentoo.org/wiki/Handbook:AMD64/Installation/Base#Timezone)

Hey Christoph, a found the following sentence in the linked page from your reply:

Please avoid the /usr/share/zoneinfo/Etc/GMT* timezones as their names do not indicate the expected zones. For instance, GMT-8 is in fact GMT+8. 

I guess this already answers your question. This bug is not caused by eselect-timezone.

Sorry for the troubles.