Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
[solved] changed timezone, now shows wrong in X
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Desktop Environments
View previous topic :: View next topic  
Author Message
lotuskip
n00b
n00b


Joined: 24 Aug 2014
Posts: 14

PostPosted: Wed Feb 11, 2015 1:55 pm    Post subject: [solved] changed timezone, now shows wrong in X Reply with quote

For reasons that are not relevant, I wanted to disable DST on my system. I set my /etc/timezone to "Etc/GMT+2" to accomplish this. I know I went against the localization howto instructions here, but the corresponding part there just baffles me:
Quote:
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.

What does that even mean? Is it supposed to say "Etc/GMT-8 will give you timezone GMT+8"? What if the number is different than 8? Screw that. I went ahead and tried "Etc/GTM+2" and it seemed to work:
Code:
$ date
Wed Feb 11 15:49:30 EET 2015

which is the correct time and zone.

But then! I'm using DWM and have in my .xinitrc a line that prints the time and date at the top of the screen.
Code:
while true; do
xsetroot -name "$(date +'%a %d/%m %H:%M')"
sleep 1m
done &

And this prints a time that's 4 hours behind (suggesting it is printing GMT-2...). But invoking the exact same date command in a terminal inside X as any user again prints the correct time. How is it even possible that the same command called somehow through startx uses a different timezone?

edit: I have restarted X and even rebooted the whole system; nothing changed.

edit2: Nevermind. Stupid me, had an 'export TZ="..."' in my .mkshrc which was messing things up. This is solved now. But if someone wants to explain the wiki passage, that'd be welcome!
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Desktop Environments All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum