You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The following code does not return the same object for both ways of converting the date to a POSIXlt object. Specifically, the timezone is both stored in a different way and set to a different value:
When casting as.POSIXlt from a date, the time zone is set to "UTC" as an attribute of the object (not as one of the names of the main list). When casting as.POSIXlt from a character string, the time zone is set to the current time zone (mine is "EST"), two additional list elements are present ("zone" and "gmtoff"), and no attribute is present.
The behavior for as.POSIXlt.Date doesn't align with the "as.POSIXlt" documentation text for the tz argument:
"" is the current time zone
Since the time zone was implicitly "", and it was set to "UTC".
The following code does not return the same object for both ways of converting the date to a POSIXlt object. Specifically, the timezone is both stored in a different way and set to a different value:
When casting as.POSIXlt from a date, the time zone is set to "UTC" as an attribute of the object (not as one of the names of the main list). When casting as.POSIXlt from a character string, the time zone is set to the current time zone (mine is "EST"), two additional list elements are present ("zone" and "gmtoff"), and no attribute is present.
The behavior for as.POSIXlt.Date doesn't align with the "as.POSIXlt" documentation text for the tz argument:
"" is the current time zone
Since the time zone was implicitly "", and it was set to "UTC".
METADATA
The text was updated successfully, but these errors were encountered: