bcgov / rcaaqs

An R package to facilitate the calculation of air quality metrics according to Canadian Ambient Air Quality Standards
Apache License 2.0
16 stars 5 forks source link

Better deal with datetimes and timezones #10

Closed ateucher closed 7 years ago

ateucher commented 8 years ago

The format_date function currently adds 28800 seconds to the output from lubridate::fast_strptime because of a bug that was present in lubridate at the time of writing this package. That bug has now been fixed).

It also may be better to just use readr::read_csv to import the data with the appropriate column parser and assume/pretend that the data are in UTC.

ateucher commented 8 years ago

The important thing to note is that all data is in Pacific Standard Time, with no Daylight Savings applied. This is Etc/GMT+8, not Canada/Pacific which incorporates daylight savings. See here. We can either import the data and convert to Etc/GMT+8 or use the lubridate functions which treat everything as UTC.

Base POSIXct and strptime convert to local time, which is not what we want.

Helpful little tutorial here

ateucher commented 7 years ago

This seems to be working. Closing until an issue arises.