LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - General
User Name
Password
Linux - General This Linux forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then this is the place.

Notices

Reply
 
LinkBack Search this Thread
Old 02-07-2012, 11:43 PM   #1
hellolqs
LQ Newbie
 
Registered: Aug 2011
Posts: 8

Rep: Reputation: Disabled
Smile Linux Time Zone configuration with TZ environmental variable


Dear all,

One of the ways to configure Linux local time zone is via TZ environmental variable. Or, /etc/timezone.

It utilizes Posix TZ string:
EST5EDT,M03.2.0,M11.1.0 (Eastern time)

My questions are:
1. Is the posix TZ string able to (somehow) reflect which year the configuration is for?
2. If the answer of the question above is negative, will the time zone configuration, let's say EST5EDT,M03.2.0,M11.1.0, directly apply to whichever year the system time currently points to?

Thanks!
hellolqs
 
Old 02-08-2012, 07:00 AM   #2
tronayne
Senior Member
 
Registered: Oct 2003
Location: Michigan
Distribution: Slackware 32- & 64-bit Stable
Posts: 1,823

Rep: Reputation: 359Reputation: 359Reputation: 359Reputation: 359
Quote:
1. Is the posix TZ string able to (somehow) reflect which year the configuration is for?
Nope.

Bear in mind that daylight saving time is political, not physical. When The Powers That Be decide to change the onset and..., uh, offset days, system libraries need to be changed to reflect that (as happened in the USA a few years ago). If the local time does not change (some US states do not), that must be reflected in the setting string but there isn't any consideration of the year.
Quote:
2. If the answer of the question above is negative, will the time zone configuration, let's say EST5EDT,M03.2.0,M11.1.0, directly apply to whichever year the system time currently points to?
Yep.

Actually, on a properly configured system you do not need to define TZ. You define the time zone the system lives in and that's that. You might set TZ if you are using a computer over a network from a different time zone, and would like times reported to you in the time zone local to you, rather than what is local to the computer. Too, you don't really need the extra arguments -- you can simply set TZ=EST5EDT and daylight on and off will be correct.

Hope this helps some.
 
Old 02-08-2012, 10:25 AM   #3
hellolqs
LQ Newbie
 
Registered: Aug 2011
Posts: 8

Original Poster
Rep: Reputation: Disabled
Thank you! Got it.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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 Off
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
environmental variable Imtiaz Deen Linux - General 2 11-11-2009 08:57 AM
environmental variable myfoot Fedora 1 01-31-2008 05:36 PM
Help: Linux Environmental Variable jkkunil Programming 2 08-01-2007 04:14 PM
linux environmental variable surender Linux - General 2 05-07-2007 07:54 AM
Problem with Time Zone Configuration chamanrana Linux - Software 8 08-06-2003 08:58 AM


All times are GMT -5. The time now is 03:45 AM.

Main Menu
 
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
identi.ca: @linuxquestions
Facebook: @linuxquestions
Open Source Consulting | Domain Registration