I am trying to edit a column of datetime values in R that are in POSIXlt format. I would like to add or subtract each row in this column by a scalar value of hours to change timezones.
so far my code looks like:
df$Time_LMT <- strptime(paste(df$Time_LMT), format = "%Y-%m-%dT%H:%M:%S", tz = "UTC")
str(df$Time_LMT)
df$Time_LMT = as.POSIXlt(df$Time_LMT,tz="Asia/Bangkok")
In the above example, I am trying to convert from the timezone UTC to the "Asia/Bangkok" timezone, however, the datetime data in the time_LMT column is still the same as it was for the UTC time, any help is appreciated.