Description Usage Arguments Value Examples
Convert POSIXt Object to UTC Time Zone
1  | toUTC(x)
 | 
x | 
 object of class POSIXt (either POSIXct or POSIXlt)  | 
POSIXt object in UTC timezone (hopefully!)
1 2 3 4 5 6 7 8 9 10 11  | # Create a timestamp in the time zone that is set on the local machine
time <- as.POSIXct("2017-11-01 01:16")
# Convert time zone to UTC
time_utc <- toUTC(time)
# The new time zone "UTC" is set in the attribute "tz"
attr(time_utc, "tz")
# The times mean the same, just expressed in another time zone!
time_utc == time
 | 
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.