r - Can somebody explain me this datetime result -
i puzzled result:
a = "2008-03-03 12:30:38" #i convert posixct , set timezone dt = as.posixct(a, format="%y-%m-%d %h:%m:%s", tz='europe/paris') dt [1] "2008-03-03 12:30:38 cet" unclass(dt) [1] 1204543838 attr(,"tzone") [1] "europe/paris" #i want come posixct as.posixct(unclass(dt), origin='1970-01-01', tz='europe/paris') [1] "2008-03-03 11:30:38 cet"
i have expected date-time a
, wrong here ?
as says in ?as.posixct
, origin in tz="gmt"
.
you can use .posixct
instead:
.posixct(unclass(dt), tz='europe/paris') # [1] "2008-03-03 12:30:38 cet"
Comments
Post a Comment