Skip to content
Back to formatted view

Raw Message

Message-ID: <E4E3186F-5A1A-4F81-927A-B15D2149735B@mac.com>
Date: 2012-02-02T02:24:58Z
From: Andrew Digby
Subject: Problem with GMT+/- time zones

I'm struggling with time zone version when expressed as hours offset from GMT. Can anyone confirm that the behaviour below is incorrect? It seems that the GMT offsets are backwards:

> format(as.POSIXct("2011-05-23 17:23:00", tz="Europe/London"),tz="America/New_York",usetz=T)
[1] "2011-05-23 12:23:00 EDT"

- this works.

> format(as.POSIXct("2011-05-23 17:23:00",tz="GMT"),tz="GMT-5",usetz=T)
[1] "2011-05-23 22:23:00 GMT"

- this doesn't work: 17:23:00 GMT should be 12:23:00 GMT-5!


Thanks.


R version 2.13.0 (2011-04-13)
Platform: x86_64-apple-darwin9.8.0/x86_64 (64-bit)