aslt | R Documentation |
The argument is converted into POSIXlt with tz="GMT".
aslt(object, ...)
## S3 method for class 'character'
aslt(object, tz = "GMT", ...)
## S3 method for class 'POSIXct'
aslt(object, tz = NA, ...)
## S3 method for class 'POSIXlt'
aslt(object, tz = NA, ...)
## S3 method for class 'numeric'
aslt(object, ...)
object |
The character, POSIXct, POSIClt, or numeric which is converted to POSIXct. |
... |
Arguments to be passed to methods. |
tz |
Timezone. If set, then the time zone will be changed of the object. |
An object of class POSIXlt
- aslt.character: Simply a wrapper for as.POSIXlt
- aslt.POSIXct: Converts to POSIXct.
- aslt.POSIXlt: Changes the time zone of the object if tz is given.
- aslt.numeric: Converts from UNIX time in seconds to POSIXlt.
# Create a POSIXlt with tz="GMT"
aslt("2019-01-01")
class(aslt("2019-01-01"))
aslt("2019-01-01 01:00:05")
# Convert between time zones
x <- aslt("2019-01-01", tz="CET")
aslt(x,tz="GMT")
# To seconds and back again
aslt(as.numeric(x, units="sec"))
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.