MathGroup Archive 2012

[Date Index] [Thread Index] [Author Index]

Search the Archive

Re: Daylight savings time in DatePlus.

  • To: mathgroup at
  • Subject: [mg124482] Re: Daylight savings time in DatePlus.
  • From: "Hans Michel" <hmichel at>
  • Date: Sat, 21 Jan 2012 05:15:55 -0500 (EST)
  • Delivered-to:
  • References: <>


I would use UTC date and time in ISO 8601 format timezone set to 0 in all
timestamping operations given a choice. But we don't know where or how your
data was collected. Here are the ideas use AbsoluteTime with TimeZone
options, DateString can also make use of the time zone offsets which is good
for plot labels to have the same ticks.
For example:

AbsoluteTime[{2010, 1, 1, 0, 0, 0}, TimeZone -> -5] - 
 AbsoluteTime[{2010, 1, 1, 0, 0, 0}]

AbsoluteTime returns number of seconds since {1900,1,1,0,0,0} there was no
UTC back then so it is in GMT. GMT and UTC can be equivalent but they are
not the same.

British Summer Time began Sunday, March 28, 2010 01:00 GMT, and ended
Sunday, October 31, 2010 01:00 GMT.

Daylight Saving Time (United States) began Sunday, March 14, 2010, 2:00am,
and ended Sunday, November 7, 2010, 2:00am.
Except Arizona and Hawaii. Move your clocks ahead 1 hour in spring and back
1 hour in fall ("Spring forward, fall back").

So if Sunday, March 14, 2010, 2:00am TimeZone is one number Sunday, November
7, 2010, 2:00am TimeZone is another number.

Filter both sets of timestamps to AbsouteTime using TimeZone and for display
back to approximate local time use current timezone. 

-----Original Message-----
From: W Craig Carter [mailto:ccarter at] 
Sent: Friday, January 20, 2012 12:52 AM
To: mathgroup at
Subject: [mg124482] Daylight savings time in DatePlus. 

I need to account for daylight savings time in list of data representing 
each hour in year 2010. I would like to correlate that with other data 
taken at 15 second intervals in the same year.

In 2010 daylight savings time in the US began on 14 March 2AM.

DateDifference[{2010, 1, 1, 1}, {2010, 3, 14, 1}, "Hour"] (*1728 hours after
beginning of year*)

DateString /@ (DatePlus[{2010, 1, 1, 1}, {#, "Hour"}] & /@Range[1728, 1738])

(*doesn't reflect that 3AM should follow 1AM*)

In hindsight, this is not surprising because daylight savings time 
shifts are not standardized intranationally or internationally.  I don't 
see any clever work-around. Does anyone else?


W Craig Carter
Professor of Materials Science, MIT

  • Prev by Date: Re: Derivatives Output as TraditionalForm
  • Next by Date: Re: Slow plotting of reflected parametric "butterflies"
  • Previous by thread: Re: Daylight savings time in DatePlus.
  • Next by thread: Re: Daylight savings time in DatePlus.