Skip to content
This repository has been archived by the owner on Jan 8, 2020. It is now read-only.

Timestamps: incorrect timezone and format #11

Closed
mmd-osm opened this issue Jun 17, 2018 · 2 comments · Fixed by #12
Closed

Timestamps: incorrect timezone and format #11

mmd-osm opened this issue Jun 17, 2018 · 2 comments · Fixed by #12

Comments

@mmd-osm
Copy link

mmd-osm commented Jun 17, 2018

Timestamps always have to be returned in UTC-0, with a "Z" at the end. Currently, yalcha returns times in UTC+03:00 timezone, without a time zone indicator:

https://vheirh41ic.execute-api.us-west-2.amazonaws.com/development/api/0.6/node/21265449/history

timestamp="2017-11-29T13:16:22"

https://api.openstreetmap.org/api/0.6/node/21265449/history

timestamp="2017-11-29T10:16:22Z"

@paulmach
Copy link
Contributor

yes, a 'Z' needs to added to this constant

const osmTimeFormat = "2006-01-02T15:04:05"

and probably some .UTC() added to the timestamps after they are loaded from the db. But it might be easier to just run the server in UTC.

@pnorman
Copy link

pnorman commented Jun 19, 2018

You probably want to set your timezone to UTC when connecting to postgres

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants