Dates/times in HTTP headers needs a specific format to be valid, and is furthermore always given in GMT time. These two functions aids in converting back and forth between the required format.
Value
to_http_date()
returns a properly formatted string, while
from_http_date()
returns a POSIXct object
Examples
time <- to_http_date(Sys.time())
time
#> [1] "Thu, 20 Feb 2025 08:25:26 GMT"
from_http_date(time)
#> [1] "2025-02-20 08:25:26 GMT"