Hi All

In trying to correlate some tide gauge data I need to deal with varying 
timezones.  From the documentation on strptime, it seemed that the tz 
variable might have some effect on the conversion, but I'm not seeing an 
effect.

> strptime("20061201 1:02 PST",format="%Y%m%d %H:%M",tz="PST")+0
[1] "2006-12-01 01:02:00 EST"
> strptime("20061201 1:02 PST",format="%Y%m%d %H:%M",tz="")+0
[1] "2006-12-01 01:02:00 EST"
> strptime("20061201 1:02 PST",format="%Y%m%d %H:%M",tz="GMT")+0
[1] "2006-12-01 01:02:00 EST"
> strptime("20061201 1:02 PST",format="%Y%m%d %H:%M",tz="UTC")+0
[1] "2006-12-01 01:02:00 EST"
> strptime("20061201 1:02 PST",format="%Y%m%d %H:%M",tz="EST")+0
[1] "2006-12-01 01:02:00 EST"

What is the recommended way of handling this?  Computing and adding 
offsets manually?

> strptime("20061201 1:02 PST",format="%Y%m%d %H:%M",tz="UTC")+3600*3
[1] "2006-12-01 04:02:00 EST"

Or am I doing something wrong with the strptime(..., tz="EST") function?

Thanks for your time,
Dave
-- 
  Dr. David Forrest
  [EMAIL PROTECTED]                                    (804)684-7900w
  [EMAIL PROTECTED]                             (804)642-0662h
                                    http://maplepark.com/~drf5n/

______________________________________________
R-help@stat.math.ethz.ch mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.

Reply via email to