[STATSGRASS] Raster time series and R - timezones?
Markus Neteler
neteler at itc.it
Mon Jun 19 14:31:34 EDT 2006
Hi,
I am processing daily time series of MODIS but cannot
figure out how to use time stamps properly. With r.what
I am looping over the maps and add a timestamp like
this "7 Apr 2006 10:30:00 UTC" to each extracted value.
Then, in R I want to analyze the time series but I
wonder how to tell R about the time zone:
> mytime <- "7 May 2006 10:30:00 UTC"
> strptime(mytime,"%d %b %Y %H:%M:%S")
[1] "2006-04-07 10:30:00"
-> UTC lost
> ISOdate(2006, 4, 7, hour = 12, min = 0, sec = 0, tz = "GMT")
[1] "2006-04-07 12:00:00 GMT"
> ISOdate(2006, 4, 7, hour = 12, min = 0, sec = 0, tz = "CEST")
[1] "2006-04-07 12:00:00 CEST"
> ISOdate(2006, 4, 7, hour = 12, min = 0, sec = 0, tz = "CESddT")
[1] "2006-04-07 12:00:00 CESddT"
-> tz accepts apparently nonsense as well?
> mytime <- "7 Feb 2006 10:30:00 UTC"
> strptime(mytime,"%d %b %Y %H:%M:%S")
[1] "2006-02-07 10:30:00"
-> do we keep daylight saving?
> mytime <- "7 May 2006 10:30:00 UTC"
> strptime(mytime,"%d %b %Y %H:%M:%S")
[1] NA
> mytime <- "7 Mai 2006 10:30:00 UTC"
> strptime(mytime,"%d %b %Y %H:%M:%S")
[1] "2006-05-07 10:30:00"
-> seems to be LOCALE depend which is pretty risky
if I share my scripts worldwide
I would appreciate hints...
thanks
Markus
PS: If you confirm that this question is appropriate for
the R-user ML, I'll ask there :-)
More information about the grass-stats
mailing list