Skip to content
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Fix POSIXt format for plotly JSON
According to plotly documentation (https://plotly.com/chart-studio-help/date-format-and-time-series/): "Chart Studio’s date format is 'yyyy-mm-dd HH:MM:SS.ssssss'.", so time_format in jsonlite::toJSON() changed to match.
  • Loading branch information
FlukeAndFeather authored Oct 26, 2020
commit 6a8a6865ef88061c8c4331773d7ede0c50770961
2 changes: 1 addition & 1 deletion R/utils.R
Original file line number Diff line number Diff line change
Expand Up @@ -1022,7 +1022,7 @@ try_file <- function(f, what) {
to_JSON <- function(x, ...) {
jsonlite::toJSON(x, digits = 50, auto_unbox = TRUE, force = TRUE,
null = "null", na = "null",
time_format = "%Y-%m-%dT%H:%M:%OS3%z", ...)
time_format = "%Y-%m-%d %H:%M:%OS6", ...)
}

# preferred defaults for toJSON mapping
Expand Down