I noticed that timestamps from attr(head_object(), "last-modified") are plain character strings (e.g. "Sun, 28 Mar 2021 04:09:09 GMT") while the analogous timestamps from get_bucket_df() are already parsed into POSIXct objects. Is there a built-in way in aws.s3 to get POSIXct timestamps from head_object(). I can manually convert the current head_object() timestamps to POSIXct using as.POSIXct(my_timestamp, format = "%a, %d %b %Y %H:%M:%S", tz = "GMT"), but I am concerned that I am overfitting the format specification and it may break when AWS or aws.s3 changes.
I noticed that timestamps from
attr(head_object(), "last-modified")
are plain character strings (e.g."Sun, 28 Mar 2021 04:09:09 GMT"
) while the analogous timestamps fromget_bucket_df()
are already parsed intoPOSIXct
objects. Is there a built-in way inaws.s3
to getPOSIXct
timestamps fromhead_object()
. I can manually convert the currenthead_object()
timestamps toPOSIXct
usingas.POSIXct(my_timestamp, format = "%a, %d %b %Y %H:%M:%S", tz = "GMT")
, but I am concerned that I am overfitting the format specification and it may break when AWS oraws.s3
changes.