Connect API Dates and Timezones

February 6, 2019 @rburr

@rburr wrote:

Hi, I have been using the connect API to download usage logs, when I noticed an odd discrepancy in the time formats. The shiny usage returned by instrumentation/shiny/usage returns started in local time, but ended in UTC. Content usage from instrumentation/content/visits is similarly returning UTC for time. Is there something in the underlying data that is causing these calls to have differing timezones?

resp <- GET(paste0(connectServer, "__api__/v1/instrumentation/shiny/usage?limit=100&min_data_version=0"),
  add_headers(Authorization = paste("Key", apiKey)))

                    started                ended
1 2018-11-20T00:12:53-05:00 2018-11-20T05:16:28Z

resp <- GET(paste0(connectServer, "__api__/v1/instrumentation/content/visits?limit=100&min_data_version=0"),
  add_headers(Authorization = paste("Key", apiKey)))

> content_usage$time[1]
[1] 2018-11-20T04:44:44Z

Posts: 3

Participants: 2

Read full topic

Previous Article
Try out RStudio Connect on Your Desktop for Free
Try out RStudio Connect on Your Desktop for Free

Have you heard of RStudio Connect, but do not know where to start? Maybe you are trying to show your manage...

Next Article
rstudio::conf 2019 Workshop materials now available
rstudio::conf 2019 Workshop materials now available

rstudio::conf 2019 featured 15 workshops on tidyverse, Shiny, R Markdown, modeling and machine learning, de...