Disabling auto conversion to daylight savings time
Is it possible to disable Red Hat 9.0 from automatically going into daylight savings mode? We have created several LAMP apps that get screwed up when going from standard time to daylight savings time.
Turns out this is a multi-step process in Linux involving creating a text file with new time zone rules, running it against 'zic' ( as in -- zic newRules.tx ), then soft linking the output file to /etc/localtime.
See this link:
about which the author was kind enough to respond, and see 'man zic' for more basic info and some additional examples.
The link posted by Saxton contains the text:
"Later we'll see how to enable and disable DST automatically in Linux."
but the actual explanation is not present.
'man zic' shows how to set up a rule to enable automatic daylight savings time conversion but not how to disable a currently existing rule. (For starters, it would be helpful to know where the file of current rules could be found.)
Anyway, if anyone knows a straightforward way to disable automatic setting of daylight savings time, I would be appreciative. We are running RHEL 5.2. (We have a lot of system stuff running at 3AM and want to do the change during our normal downtime window of 9AM-noon
Here is part of the document I wrote up to remind myself how to do it:
// create noDST4me file in /usr/share/zoneinfo/America/
# Rule Name From To Type In On At Save Letter/s
Rule NeutronDB 2004 maximum - Apr 1 0:00 0 S
# Zone Name GMTOff Rules/Save Format Until
Zone America/Chicago -6:00 NeutronDB C%sT
// then run from command line:
linux_prompt> zic noDST4me
// This compiles and installs the rule in noDST4me into America/Chicago.
// Since the rule has been set for America/Chicago within noDST4me,
// it is America/Chicago that is soft linked to /etc/localtime:
ln -sf /usr/share/zoneinfo/America/Chicago /etc/localtime
linux_prompt> ls -al /etc/localtime
linux_prompt> /etc/localtime -> /usr/share/zoneinfo/America/Chicago
I would first save the old timezone file by renaming it before overwriting with a new rule declared.
Hope this gets you started.
|All times are GMT -5. The time now is 01:47 PM.|