Conversions between POSIXct to HTTP Date objects.

Arguments

from

numeric, POSIXct or HTTPDate object.

References

RFC7231 MDN

Examples

# convert POSIXct to HTTP date string
as(0, "HTTPDate") # Thu, 01 Jan 1970 00:00:00 GMT
as(Sys.time(), "HTTPDate")
# parse HTTP date string to POSIXct
dt = "Thu, 01 Jan 1970 00:00:00 GMT"
class(dt) = "HTTPDate"
as(dt, "POSIXct")