r - as.Date() does not respect POSIXct time zones -
okay here subtle "quirk" in r as.date function converting posixct timezone, wondering if bug.
> as.posixct("2013-03-29", tz = "europe/london") [1] "2013-03-29 gmt" > as.date(as.posixct("2013-03-29", tz = "europe/london")) [1] "2013-03-29"
so far no problem, but.....
> as.posixct("2013-04-01", tz = "europe/london") [1] "2013-04-01 bst" > as.date(as.posixct("2013-04-01", tz = "europe/london")) [1] "2013-03-31"
anybody seen this? bug or quirk? april fools?
the default time zone as.date.posixct
"utc"
(see page). try as.date(as.posixct("2013-04-01", tz = "europe/london"),tz = "europe/london")
.
Comments
Post a Comment