Convert date time object to string in assign_tz_code() function

pull/130/head
Meng Li 2021-04-06 23:28:53 +00:00
parent 1025e6d9d8
commit 78173c54ab
1 changed files with 3 additions and 0 deletions

View File

@ -45,6 +45,9 @@ assign_tz_code <- function(data, device_id, tz_codes, device_type){
data$local_timezone <- if_else(start <= data[[column]] & data[[column]] < end, time_zone, data$local_timezone) data$local_timezone <- if_else(start <= data[[column]] & data[[column]] < end, time_zone, data$local_timezone)
} }
if(column == "local_date_time")
data$local_date_time <- format(data$local_date_time, format="%Y-%m-%d %H:%M:%S")
return(data %>% filter(!is.na(local_timezone))) return(data %>% filter(!is.na(local_timezone)))
} }