LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 03-11-2016, 02:20 PM   #1
paperbagperson
LQ Newbie
 
Registered: Mar 2016
Posts: 10

Rep: Reputation: Disabled
Avoid Going into DST Without Changing Timezone


According to a nice zdump, my server will be going into DST time this Sunday

Code:
# zdump -v /etc/localtime | grep 2016
/etc/localtime  Sun Mar 13 06:59:59 2016 UTC = Sun Mar 13 01:59:59 2016 EST isdst=0 gmtoff=-18000
/etc/localtime  Sun Mar 13 07:00:00 2016 UTC = Sun Mar 13 03:00:00 2016 EDT isdst=1 gmtoff=-14400
/etc/localtime  Sun Nov  6 05:59:59 2016 UTC = Sun Nov  6 01:59:59 2016 EDT isdst=1 gmtoff=-14400
/etc/localtime  Sun Nov  6 06:00:00 2016 UTC = Sun Nov  6 01:00:00 2016 EST isdst=0 gmtoff=-18000
Is there a way for me to edit some file so that the server doesn't change the time this Sunday without changing the server's timezone?
 
Old 03-11-2016, 02:30 PM   #2
sundialsvcs
LQ Guru
 
Registered: Feb 2004
Location: SE Tennessee, USA
Distribution: Gentoo, LFS
Posts: 10,659
Blog Entries: 4

Rep: Reputation: 3941Reputation: 3941Reputation: 3941Reputation: 3941Reputation: 3941Reputation: 3941Reputation: 3941Reputation: 3941Reputation: 3941Reputation: 3941Reputation: 3941
The answer is: "yes."

Any time-zone file (".tz file") can be selected, and this file will specify among other things the dates of a daylight-time ("DST") shift, if any, and obscurities like "leap seconds."

Several time-zone files are readily available for places that ordinarily follow different customs. For example, Arizona (USA) does not observe DST, so there's a standard file for "Phoenix." But the Navajo nation, within Arizona, does observe DST, so they might use the file for "Denver."

You can tell your system to use any time-zone file you wish ... or, create one of your own.

TZ files are also good for historical dates! The time-zone files not only remember "DST rules for the present day," but also the periods of time in the past when other rules applied, so that an absolute-time (UTC) can still be correctly converted to what is ... or, as the case may be ... would have been, the correct local interpretation of "that point in time."

For a good reference, see:

Last edited by sundialsvcs; 03-11-2016 at 02:42 PM.
 
Old 03-11-2016, 02:31 PM   #3
suicidaleggroll
LQ Guru
 
Registered: Nov 2010
Location: Colorado
Distribution: OpenSUSE, CentOS
Posts: 5,573

Rep: Reputation: 2142Reputation: 2142Reputation: 2142Reputation: 2142Reputation: 2142Reputation: 2142Reputation: 2142Reputation: 2142Reputation: 2142Reputation: 2142Reputation: 2142
I think you would have to edit the dates of the DST jump for your tz file, but why would you want to do that? The only thing that will change are scheduled jobs through cron and the times that get printed out when you run an ls or date (without the -u flag), nothing else should be affected AFAIK.

Last edited by suicidaleggroll; 03-11-2016 at 02:33 PM.
 
Old 03-11-2016, 02:48 PM   #4
paperbagperson
LQ Newbie
 
Registered: Mar 2016
Posts: 10

Original Poster
Rep: Reputation: Disabled
Cool

Quote:
Originally Posted by sundialsvcs View Post
You can tell your system to use any time-zone file you wish ... or, create one of your own.
How would I go about creating my own/editing a .tz file?
 
Old 03-11-2016, 04:47 PM   #5
michaelk
Moderator
 
Registered: Aug 2002
Posts: 25,704

Rep: Reputation: 5896Reputation: 5896Reputation: 5896Reputation: 5896Reputation: 5896Reputation: 5896Reputation: 5896Reputation: 5896Reputation: 5896Reputation: 5896Reputation: 5896
Never played with the tz database but you would need to install the zic compiler as well as the source files. I know it is not what you wanted but you could change to a fixed time zone i.e. GMT-5.

https://www.iana.org/time-zones/repository/tz-link.html
 
  


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 Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
AIX vs linux timezone an dst NevemTeve AIX 1 04-28-2015 10:46 AM
changing timezone and cmos wufo Slackware 2 02-12-2011 08:00 PM
Change timezone DST r_etemaadi Linux - Newbie 5 05-01-2008 12:27 AM
changing timezone in cli avijitp Linux - Software 7 04-10-2007 11:54 AM
CLI changing of Timezone bretthoward Linux - General 0 08-04-2001 08:24 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 10:02 PM.

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