MazamaScience/MazamaCoreUtils

support EPA time format

Closed this issue · 1 comments

EPA AirNow requires that times be in the following format: "20221112T0000-0800"

If parsing fails, the parseDatetime() function can test the firsts element for this format (or including minutes) and then use the following code:

# * datetime -----
df$datetime <- 
  df$datetime %>%
  base::strptime("%Y%m%dT%H%M%z", tz = "UTC") %>%
  base::as.POSIXct()

Resolved in version 0.4.15