[R] POSIXlt and daylight savings time

Rui Barradas ruipbarradas at sapo.pt
Wed Sep 5 13:26:33 CEST 2012


Hello,

Jeff already answered to your question,

as.POSIXlt('2004-10-31 02:00:00', format = "%Y-%m-%d %H:%M:%S")

And in my system and timezone (GMT) I get
as.POSIXlt('2004-10-31 02:00:00')
[1] "2004-10-31 02:00:00"

So Jeff's point (b) should also be followed.

sessionInfo()
R version 2.15.1 (2012-06-22)
Platform: i386-pc-mingw32/i386 (32-bit)

locale:
[1] LC_COLLATE=Portuguese_Portugal.1252 LC_CTYPE=Portuguese_Portugal.1252
[3] LC_MONETARY=Portuguese_Portugal.1252 LC_NUMERIC=C
[5] LC_TIME=Portuguese_Portugal.1252

attached base packages:
[1] stats     graphics  grDevices utils     datasets  methods base

loaded via a namespace (and not attached):
[1] fortunes_1.4-2 tools_2.15.1

Hope this helps,

Rui Barradas

Em 05-09-2012 09:24, pdb escreveu:
> I'll rephrase the question...
>
> If you try...
>
> as.POSIXlt('2004-10-31 02:00:00')
>
> you get
>
> [1] "2004-10-31"
>
> What do I need to do to make it return
>
> [1] "2004-10-31 02:00:00"
>
>
>
> --
> View this message in context: http://r.789695.n4.nabble.com/POSIXlt-and-daylight-savings-time-tp4642253p4642272.html
> Sent from the R help mailing list archive at Nabble.com.
>
> ______________________________________________
> R-help at r-project.org 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.




More information about the R-help mailing list