Convert an object of class Date to class POSIXct without getting bogged down in timezone calculation.
DateToPOSIX(timestamps)
YearMonToPOSIX(timestamps)
An object of class yearmon
or
Date
to be converted to POSIXct.
Steven L. Scott steve.the.bayesian@gmail.com
Calling as.POSIXct
on another date/time object
(e.g. Date) applies a timezone correction to the object. This can
shift the time marker by a few hours, which can have the effect of
shifting the day by one unit. If the day was the first or last in a
month or year, then the month or year will be off by one as well.
Coercing the object to the character representation of a Date prevents this adjustment from being applied, and leaves the POSIXt return value with the intended day, month, and year.