How do you convert dates/times from one time zone to another in R?

Package lubridate holds two functions to convert timezones. According to the help pages:

force_tz returns a date-time that has the same clock time as x in the new time zone.

force_tz(time, tzone = "America/Los_Angeles")

with_tz changes the time zone in which an instant is displayed. The clock time displayed for the instant changes, but the moment of time described remains the same.

with_tz(time, tzone = "America/Los_Angeles")

Leave a Comment