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

Popular posts from this blog

Delphi XE2 Indy10 udp client-server interchange using SendBuffer-ReceiveBuffer -

Qt ActiveX WMI QAxBase::dynamicCallHelper: ItemIndex(int): No such property in -

Enable autocomplete or intellisense in Atom editor for PHP -