Fix timezone for US Eastern Time

replace/3d156989d5d488fd81e3f41858fb43ca11f54cf5
JulioV 2019-11-06 17:12:06 -05:00
parent f37331f824
commit 2adfe8d81a
2 changed files with 4 additions and 2 deletions

View File

@ -11,8 +11,10 @@ DAY_SEGMENTS: &day_segments
[daily, morning, afternoon, evening, night]
# Global timezone
# Use codes from https://en.wikipedia.org/wiki/List_of_tz_database_time_zones
# Double check your code, for example EST is not US Eastern Time.
TIMEZONE: &timezone
EST
America/New_York
# Download data config
DOWNLOAD_DATASET:

View File

@ -28,7 +28,7 @@ if(!is.null(timezone_periods)){
timezone = as.character(timezone)) %>%
rowwise() %>%
mutate(utc_date_time = as.POSIXct(timestamp/1000, origin="1970-01-01", tz="UTC"),
local_date_time = format(utc_date_time, tz = timezone, usetz = F))
local_date_time = format(utc_date_time, tz = timezone, usetz = T))
output <- split_local_date_time(output)
write.csv(output, sensor_output)
} else if(!is.null(fixed_timezone)){