Operating System - Linux
1754320 Members
3248 Online
108813 Solutions
New Discussion юеВ

Avoiding Daylight Saving on Linux

 
SOLVED
Go to solution
girishb
Frequent Advisor

Avoiding Daylight Saving on Linux

Hi,

We have Redhat Linux 7.0 and Redhat Enterprise Linux 3.0 Production Servers running at US.

We do not want to apply daylight saving patch on these servers since they are going to be scraped in mid of next month.

I would like to know below mentioned so that the production servers are not effected by DST till date.

1. Can we manually change the time.
2. What server config changes do we have to make, so that the the daylight saving does not come effect.

Your responses is really appreciated.

Thanks in advance.
Girish

I have four measurement computers and one server that needs to totally IGNORE daylight saving time dates, and just go on as nothing happend when the rest of the world (at least some countries) change their clocks. I have several questions regarding this:
5 REPLIES 5
Ivan Ferreira
Honored Contributor
Solution

Re: Avoiding Daylight Saving on Linux

>>> 1. Can we manually change the time.

You could, but you should do it in single user mode. You must change your timezone to disable DST before or DST will apply anyway.

>>> 2. What server config changes do we have to make, so that the the daylight saving does not come effect.

Create your own zone file, compile it with zic and activate it copying to /etc/localtime. See:

tldp.org/HOWTO/TimePrecision-HOWTO/
Por que hacerlo dificil si es posible hacerlo facil? - Why do it the hard way, when you can do it the easy way?
James R. Ferguson
Acclaimed Contributor

Re: Avoiding Daylight Saving on Linux

Hi:

I'd add a third option to Ivan's suggestions.

Simply change your timezone to UTC (GMT).

Regards!

...JRF...
girishb
Frequent Advisor

Re: Avoiding Daylight Saving on Linux

Thanks James and Ivan,

So if I change the timezone to UTC, I don't have to worry about DST right?

Can I follow the below link to change the timezone

http://kbase.redhat.com/faq/FAQ_43_3981.shtm

Thanks for the response!!
Girish
Ivan Ferreira
Honored Contributor

Re: Avoiding Daylight Saving on Linux

Good option the provided by SEP, just remember that the timezone change takes immediatly, and you will experiment a change in your date/time.

The link you provided can be used to change your timezone.
Por que hacerlo dificil si es posible hacerlo facil? - Why do it the hard way, when you can do it the easy way?
James R. Ferguson
Acclaimed Contributor

Re: Avoiding Daylight Saving on Linux

Hi (again):

> So if I change the timezone to UTC, I don't have to worry about DST right?

Correct, except, of course your clock will be some number of hours behind UTC since you like in the United States.

You can see various differences by doing:

# TZ=UTC date
# TZ=EST5EDT date
# TZ=PST8PDT date

...note that there is a space after the TZ setting on the command line and before the 'date' command'. That keeps the setting in force *only* for the duration of the command line.

The link you reference should help you.

Please also read:

http://forums1.itrc.hp.com/service/forums/helptips.do?#28

Regards!

...JRF...