posit-dev / posit-dev/connectapi
get_variant_schedule always reports next run as UTC (even if schedule is set-up in different time-zone)
Dieses Issue hat noch niemand übernommen.
- Vorherrschende Sprache
- R
- Sterne
- 54
- Forks
- 27
- Ø Merge
- 1 T. 3 Min.
- Gemergte PRs (30 T.)
- 1
Beschreibung
Dear,
While I am aware that the get_variant_schedule is still to be considered experimental, I would like to report a potential bug to help improve it.
Problem description
Currently, if a schedule is set in, for example, GMT+2 (Brussels, CEST), the output of get_variant_schedule(variant)$schedule_data$next_run is reported as: "2022-09-13T14:05:19Z" (i.e. being "Zulu" time or UTC).
Parsing with as.POSIXct leads to the time being recognized as UTC. This is incorrect, since it is actually should read: "2022-09-13T14:05:19+02:00" to be correct (and ISO8601 compliant).
Alternatively, the time could be given in UTC as well, but then should be substracted by 2 h (in this case): "2022-09-13T12:05:19Z"
Reprex
Hard to provide a code reprex, since I mostly use the GUI to set a schedule. The following steps should be sufficient to reproduce.
- Deploy an Rmarkdown document that can generate scheduled output to Rstudio connect
- Set the schedule in a timezone other than UTC
- Query the published item using
item <- connectapi::content_item - Get the item's default variant using
default_variant <- connectapi::get_variant_default(item) - Get the default variant's schedule using
default_schedule <- connectapi::get_variant_schedule(own_default_variant) - Inspect the output of
default_schedule$schedule_data$next_run
Session information
- R 4.2.1
- RStudio connect 2022.07.0
- connectapi 0.1.1.1
Beitragsleitfaden
Erste Schritte
- Lies das ganze Issue und danach den Beitragsleitfaden des Projekts.
- Schreib ins Issue, dass du es übernimmst — das erspart doppelte Arbeit.
- Forke das Repository und arbeite in einem Branch.
- Öffne einen Pull Request, der die Issue-Nummer nennt.
Rechercherichtung
Beginne am Einstiegspunkt get_variant_schedule und verfolge, wie schedule_data$next_run geparst oder formatiert wird. Reproduziere das Problem, indem du einen Zeitplan in einer Nicht-UTC-Zeitzone erstellst, und überprüfe dann den zurückgegebenen Zeitstempel; als erledigt gilt die Aufgabe, wenn der Zeitzonenoffset und der Zeitpunkt korrekt dargestellt werden.
Vom Indexierungsmodell aus dem Issue-Text verfasst.
Bewertung
- Tech-Stack
- r
- Bereich
- api
- Issue-Typ
- Bug
- Schwierigkeit
- 3/5
- Geschätzter Aufwand
- 1-2 Tage
- Aktivitätsstatus
- Veraltet
- Klarheit
- Größtenteils klar
- Anfängerfreundlichkeit
- 45/100