EdwinTh / padr

Padding of missing records in time series
https://edwinth.github.io/padr/
Other
132 stars 12 forks source link

pad incorrectly breaks quarter, month, and day #10

Closed EdwinTh closed 7 years ago

EdwinTh commented 7 years ago

When the datetime variable is of class POSIXt it will not pad when the interval is one of the three. Suspect it is due to some incorrect spanning with daylight savings time, since the problem does not occur when interval is year.

EdwinTh commented 7 years ago

This was done by check_start_end, even when neither a start_val nor an end_val was specified. It appeared that when concatenating POSIX vectors, as happened in the check_start_end function, the result is enforced to the timezone of the locale (including daylight savings time). This breaks the interval if the original vectors were not of this timezone. Workaround is implemented.