Fix a bug involving the handling of timestamps from Connect.
Approach
Connect sends timestamps in RFC 3339 format. Specifically:
Timestamps with no UTC offset end in Z, e.g. "2020-01-01T01:02:03Z"
Timestamps with an offset end in ±hh:mm, e.g. "2023-08-22T15:13:14+01:00"
Details on the approaches used.
This PR fixes a bug where we would not parse time stamps with an offset, resulting in NA values. It uses a combination of regular expressions and using different time format specifiers for different incoming time stamps.
Converts all incoming timestamps to UTC. Previously, we only parsed UTC times at all, but just fixing the time format revealed a bug where we assigned UTC to non-UTC timestamps.
Fixes a bug in make_timestamp(), which creates timestamps for Connect. Previously, would output all timestamps as UTC, even though they were in the local system time.
Tests
Added tests for a range of expected inputs. Tests take place in multiple time zones.
Fixes #290
Intent
Fix a bug involving the handling of timestamps from Connect.
Approach
Connect sends timestamps in RFC 3339 format. Specifically:
Z
, e.g."2020-01-01T01:02:03Z"
±hh:mm
, e.g."2023-08-22T15:13:14+01:00"
Details on the approaches used.
make_timestamp()
, which creates timestamps for Connect. Previously, would output all timestamps as UTC, even though they were in the local system time.Tests
Added tests for a range of expected inputs. Tests take place in multiple time zones.