Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
Questions on gentoo timezone
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Installing Gentoo
View previous topic :: View next topic  
Author Message
hypeboyz
n00b
n00b


Joined: 26 Feb 2012
Posts: 24

PostPosted: Fri Mar 21, 2014 12:51 am    Post subject: Questions on gentoo timezone Reply with quote

I live in China and I set my /etc/timezone to Asia/Shanghai and update /etc/localtime by emerge --config timezone-data
But when I use command "date" to get the current time the timezone column is still CST
According to APUE environment variable TZ is defined by POSIX but it was left undefined in gentoo distribution so I wondered, why?
Thanks a lot
Back to top
View user's profile Send private message
John R. Graham
Administrator
Administrator


Joined: 08 Mar 2005
Posts: 10261
Location: Somewhere over Atlanta, Georgia

PostPosted: Fri Mar 21, 2014 1:44 pm    Post subject: Reply with quote

Could you post the output of the following command, please?
Code:
md5sum /etc/localtime /usr/share/zoneinfo/Asia/Shanghai
- John
_________________
I can confirm that I have received between 0 and 499 National Security Letters.
Back to top
View user's profile Send private message
szatox
Veteran
Veteran


Joined: 27 Aug 2013
Posts: 1746

PostPosted: Fri Mar 21, 2014 5:46 pm    Post subject: Reply with quote

AFAIR you don't need /etc/timezone file at all. What you do need, is a symbolic link from /etc/localtime to /usr/share/zoneifno/<YOUR TIMEZONE>
Back to top
View user's profile Send private message
NeddySeagoon
Administrator
Administrator


Joined: 05 Jul 2003
Posts: 43198
Location: 56N 3W

PostPosted: Fri Mar 21, 2014 9:34 pm    Post subject: Reply with quote

szatox,

The symbolic link is safe as long as /usr/share/zoneifno/<YOUR TIMEZONE> is on /. It can break while the link target is not available.
e.g. when /usr is separate.
_________________
Regards,

NeddySeagoon

Computer users fall into two groups:-
those that do backups
those that have never had a hard drive fail.
Back to top
View user's profile Send private message
hypeboyz
n00b
n00b


Joined: 26 Feb 2012
Posts: 24

PostPosted: Sat Mar 22, 2014 6:57 am    Post subject: Reply with quote

John R. Graham wrote:
Could you post the output of the following command, please?
Code:
md5sum /etc/localtime /usr/share/zoneinfo/Asia/Shanghai
- John

Oops, sorry I made the mistake. The md5 checksum from both file are equivalent. The timezone CST means China Standard Time which I've mistaken it as Central Standard Time. Thank you anyway!
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Installing Gentoo 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