auEstTime <- function(strdt) as.POSIXct(strdt, tz="Australia/Canberra") auEstDeltaT <- function(t2, t1) { auEstTime(t2)-auEstTime(t1) } # 2013-10-06 we'll loose one hour auEstDeltaT('2013-10-06 06:00', '2013-10-06 00:00') # Time difference of 5 hours # Right auEstDeltaT('2013-10-06 03:00', '2013-10-06 02:00') # Time difference of 2 hours # that's odd... beware edge case auEstDeltaT('2013-10-06 03:00', '2013-10-06 01:59') # Time difference of 1 mins # correct auEstDeltaT('2013-10-06 02:59', '2013-10-06 02:00') # Time difference of 0 secs #edge case, so why not. # 2013-04-07 we gained an hour auEstDeltaT('2013-04-07 03:00', '2013-04-07 02:00') #Time difference of 2 hours #For unknown reasons the behavior changes around minute 32 of that hour span. auEstDeltaT('2013-04-07 03:00', '2013-04-07 02:32') #Time difference of 1.466667 hours auEstDeltaT('2013-04-07 03:00', '2013-04-07 02:33') #Time difference of 27 mins