Try

> strptime(t, format="%Y-%m-%dT%H:%M:%S", tz="UTC")  # note tz=  <<<<<<<<<

[1] "2011-09-19 13:30:00 UTC"

Then

> xts(1, strptime(t, format="%Y-%m-%dT%H:%M:%S", tz="UTC"),
>tzone="America/Chicago")
                    [,1]
2011-09-19 08:30:00    1


> xts(1, strptime(t, format="%Y-%m-%dT%H:%M:%S", tz="UTC"),
>tzone="America/New_York")
                    [,1]
2011-09-19 09:30:00    1
Warning message:
timezone of object (America/New_York) is different than current timezone
(America/Chicago).



Which looks right-ish to me.

You can store it in whatever TZ you want, the warning is just telling you
that something is different and you should be aware.  Probably need to
have a flag to disable that - or only show once...

HTH
Jeff


On 4/5/12 2:29 PM, "algotr8der" <[email protected]> wrote:

>%Y-%m-%dT%H:%M:%S"

_______________________________________________
[email protected] mailing list
https://stat.ethz.ch/mailman/listinfo/r-sig-finance
-- Subscriber-posting only. If you want to post, subscribe first.
-- Also note that this is not the r-help list where general R questions should 
go.

Reply via email to