By default, the (internal) conversion to (fractional) seconds since the epoch is
relative to the locatime of this system, and therefore not completely
independent of the settings of the local system. This is to strike a
balance between ease of use and functionality. A more-full featured
conversion could be possibly be added with support for arbitrary
reference times, but this is (at least) currently outside the scope of
this package. See the RcppCCTZ package which offers some
timezone-shifting and differencing functionality. As of version 0.0.5 one
can also parse relative to UTC avoiding the localtime issue,
Times and timezones can be tricky. This package offers a heuristic approach,
it is likely that some input formats may not be parsed, or worse, be parsed
incorrectly. This is not quite a Bobby Tables
situation but care must always be taken with user-supplied input.
The Boost Date_Time library cannot parse single digit months or
days. So while ‘2016/09/02’ works (as expected),
‘2016/9/2’ will not. Other non-standard formats may also
fail.
There is a known issue (discussed at length in
issue
ticket 5) where Australian times are off by an hour. This seems
to affect only Windows, not Linux.
When given a vector, R will coerce it to the type of the first
element. Should that be NA
, surprising things can
happen: c(NA, Sys.Date())
forces both values to
numeric
and the date will not be parsed correctly (as its
integer value becomes numeric before our code sees it). On the
other hand, c(Sys.Date(), NA)
works as expected parsing as
type Date with one missing value. See
issue
ticket 11 for more.
Another known issue concerns conversion when the timezone is set
to ‘Europe/London’, see GitHub issue tickets
36.
51.
59. and
86. As
pointed out in the comment in that last one, the
Sys.timezone
manual page suggests several
alternatives to using ‘Europe/London’ such as ‘GB’.