Because as.POSIXct.Date
doesn't look for a timezone (and won't pass it to .POSIXct
if you specify it in ...
) and Date objects are "UTC", so your POSIXct
is offset from the UTC of the Date object.
It would be better to call as.POSIXct
on the character string directly, if you can:
> as.POSIXct("2014-07-08", format="%Y-%m-%d")
[1] "2014-07-08 BRT"
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…