rstudio / connectapi

An R package for interacting with the RStudio Connect Server API
https://pkgs.rstudio.com/connectapi/
Other
43 stars 25 forks source link

`coerce_datetime` losing time part of `get_audit_logs` #259

Closed minemR closed 4 months ago

minemR commented 5 months ago

When using get_audit_logs we are losing precision of time.

Trying to pinpoint the location where it is happening I stumbled on coerce_datetime.

reprex:

z <- connectapi:::coerce_datetime('2023-07-07T16:14:49+03:00', structure(NA_real_, class = c("POSIXct", "POSIXt"), tzone = "UTC"), 'time')
z
# [1] "2023-07-07 UTC"
format(z, '%d/%b/%Y:%H:%M:%S')
# [1] "07/Jul/2023:00:00:00"