Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Timestamps should be zoned #75

Open
markborkum opened this issue Oct 16, 2017 · 1 comment
Open

Timestamps should be zoned #75

markborkum opened this issue Oct 16, 2017 · 1 comment

Comments

@markborkum
Copy link
Contributor

Pacifica Metadata version

1.0

Pacifica Core Software versions

n/a

Platform Details

All supported platforms.

Scenario:

Client retrieves JSON encoding of one or more records using HTTP end-point. Client expects timestamps to be encoded using the ISO 8601 standard. Client attempts to parse timestamp. Parsing fails.

Steps to Reproduce:

  1. Issue HTTP GET request to end-point, e.g., GET /users?_id=12345.

Expected Result:

Timestamps (e.g., "created", "updated", and "deleted") should be zoned, i.e., should include time zones using the ISO 8601 standard.

For example, using the ISO 8601 standard, if the timestamps are localized to Zulu time:

{
  "_id": 12345,
  ...
  "created": "2017-12-25T00:00:00Z",
  "updated": "2017-12-25T00:00:00Z",
  "deleted": null
}

where the "Z" suffix denotes Zulu time.

Alternatively, using the ISO 8601 standard, if the timestamps are not localized:

{
 "_id": 12345,
 ...
 "created": "2017-12-25T00:00:00+00:00",
 "updated": "2017-12-25T00:00:00+00:00",
 "deleted": null
}

where the "+00:00" suffix denotes the time zone.

Actual Result:

Timestamps are not zoned.

{
  "_id": 12345,
  ...
  "created": "2017-12-25T00:00:00",
  "updated": "2017-12-25T00:00:00",
  "deleted": null
}
@dmlb2000
Copy link
Member

Timezones are another one of those difficult things to get right, like unicode and locale messages...

The plan here has always been that we store UTC times and we need to provide UTC timezones. The interfaces are designed for other user applications to consume and it's up to them to localize the timezone for the users interacting with the system.

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

No branches or pull requests

2 participants