Skip to content
Merged
Show file tree
Hide file tree
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
2 changes: 1 addition & 1 deletion DESCRIPTION
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
Package: osmdata
Title: Import 'OpenStreetMap' Data as Simple Features or Spatial Objects
Version: 0.3.0.9025
Version: 0.3.0.9026
Authors@R: c(
person("Joan", "Maspons", , "joanmaspons@gmail.com", role = c("aut", "cre"),
comment = c(ORCID = "0000-0003-2286-8727")),
Expand Down
1 change: 1 addition & 0 deletions NEWS.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
## Breaking changes

- `getbb()` throws a warning instead of an error for empty results and return the (empty) result with the expected type according to `format_out` parameter (#394).
- Timestamp in metadata has a POSIXct time. Before it was character with a non-standard locale dependent date format (#416).

## Major changes

Expand Down
7 changes: 2 additions & 5 deletions R/get-osmdata.R
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ timestamp_fmt_iso8601 <- "%Y-%m-%dT%H:%M:%SZ" # ISO 8601. Z indicates tz = "UTC"
#'
#' @param doc OSM XML document. If missing, `Sys.time()` is used.
#'
#' @return An R timestamp object
#' @return A POSIXct timestamp
#'
#' @note This defines the timestamp format for \pkg{osmdata} objects, which
#' includes months as text to ensure umambiguous timestamps
Expand All @@ -28,10 +28,7 @@ get_timestamp <- function (doc) {
tstmp <- Sys.time ()
}

## TODO: avoid a non-standard date string, return a POSIXct value
out <- paste ("[", format (tstmp, format = "%a %e %b %Y %T"), "]")
out <- gsub (" ", " ", out) # remove extra space in %e for single digit days
out <- gsub ("\\.", "\\\\.", out) # Escape dots
tstmp
}


Expand Down
Loading