[R] R internal clock time discrepancy

toby marthews raspberry at webmail.co.za
Wed Jun 14 12:41:14 CEST 2006


Dear R:

I'm trying to map some time series data on to dates and
because I'm using R's "strptime' facility I get an hour's
break in my time series: my readings for between 1am and
2am on 27th March 2005 won't map onto anything (I'm using a
data logger to record temperature and other things in a
forest).

As far as I know, the clock's didn't change on 27th March
2005 so why is this happening?

> start=strptime("2005-03-27 00:00","%Y-%m-%d %H:%M")
> end=strptime("2005-03-27 02:30","%Y-%m-%d %H:%M")
> seq(from=start,to=end,by=30*60)
[1] "2005-03-27 00:00:00 GMT Standard Time" "2005-03-27
00:30:00 GMT Standard Time" "2005-03-27 02:00:00 GMT
Standard Time"
[4] "2005-03-27 02:30:00 GMT Standard Time"
> as.numeric(seq(from=start,to=end,by=30*60))
[1] 1111881600 1111883400 1111885200 1111887000
> as.numeric(seq(from=start,to=end,by=30*60))/(30*60)
[1] 617712 617713 617714 617715

Any help much appreciated!

Toby Marthews
___________________________________________________________________
For super low premiums, click here http://www.webmail.co.za/dd.pwm

http://www.webmail.co.za the South African FREE email service



More information about the R-help mailing list