LinuxQuestions.org
Review your favorite Linux distribution.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Server
User Name
Password
Linux - Server This forum is for the discussion of Linux Software used in a server related context.

Notices


Reply
  Search this Thread
Old 02-26-2008, 04:44 AM   #1
LongPig_Yum
LQ Newbie
 
Registered: Feb 2008
Posts: 4

Rep: Reputation: 0
Test Daylight Savings change


I just patched my Redhat AS 3 server with the DST patch and wanted to test it. When I set the date and time with the regular date command :
date 04060259
It did not roll back the time.
When I set the date and time for next Oct :
date 10050159.
It did put forward the time.

I found this explanation :

“Setting the time to 02:59:50 would be ambiguous and the date command takes it to mean the second 02:59:50
that morning rather than the first, and the rollover isn't seen to happen.”

If that is the case. Why did the roll forward work.

Setting it with the UTC time DID work.

date --utc 040515592008.50

date
Sun Apr 6 02:59:50 EST 2008

sleep 20

date
Sun Apr 6 02:00:10 EST 2008

Anyone have any ideas why the time did roll forward but not back
when set with the normal date command and "olson" format
ZONE="Australia/Sydney"
 
Old 02-26-2008, 07:47 AM   #2
Simon Bridge
LQ Guru
 
Registered: Oct 2003
Location: Waiheke NZ
Distribution: Ubuntu
Posts: 9,211

Rep: Reputation: 198Reputation: 198
You need to understand why there is an ambiguity.

Assuming DST change at 02:30:00 hrs...
On the roll forward, 02:29:59 changes, next second, to 03:30:00. So there is only one 02:29:50 that day. So there is no ambiguity. (But you just try setting it to 02:50:00!)

On a roll-back, 02:29:59 changes, next second, into... 01:30:00 and all the times from then to 02:29:59 get a second showing. (On the day, 3/4 hour after 1:45 the clock reads 1:30!)

Now, if you set the time within the region, say 0200hrs, then how is the computer supposed to know that you mean before or after DST takes effect?

Last edited by Simon Bridge; 02-26-2008 at 07:51 AM.
 
  


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
Daylight savings change in New Zealand seany_nz Linux - Server 1 07-16-2007 04:49 PM
Daylight Savings Time Change? Larry Webb Linux - General 7 03-11-2007 03:08 PM
Daylight Savings Time Change TheB2B Fedora 7 03-11-2007 07:46 AM
DayLight savings change for Redhat 8.0 & 9.0 sachinh Linux - Enterprise 16 03-10-2007 11:27 PM
Change to Daylight Savings Time has shifted my file times hippiness Linux - General 4 03-31-2006 02:31 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Server

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

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