When data is imported through LightLogR
and a timezone applied, it is
assumed that the timestamps are correct - which is the case, e.g., if
timestamps are stored in UTC
, or they are in local time. Some if not most
measurement devices are set to local time before a recording interval starts.
If during the recording a daylight savings jump happens (in either
direction), the device might not adjust timestamps for this change. This
results in an unwanted shift in the data, starting at the time of the DST
jump and likely continues until the end of a file. dst_change_handler
is
used to detect such jumps within a group and apply the correct shift in the
data (i.e., the shift that should have been applied by the device).
important Note that this function is only useful if the time stamp in
the raw data deviates from the actual date-time. Note also, that this
function results in a gap during the DST jump, which should be handled by
gap_handler()
afterwards. It will also result in potentially double the
timestamps during the jum back from DST to standard time. This will result
in some inconsistencies with some functions, so we recommend to use
aggregate_Datetime()
afterwards with a unit
equal to the dominant epoch.
Finally, the function is not equipped to handle more than one jump per group.
The jump is based on whether the group starts out with DST or not. the
function will remove datetime rows with NA
values.