Skip to content

Collection publishDate metadata doesn't include time zone #394

@ottonomy

Description

@ottonomy

Describe the bug

When I request GET /api/collections I got back a resource with a "publishDate":"2023-05-01T23:34:24". This doesn't specify a timezone offset from UTC (or a "Z" to indicate UTC). It's unclear when to interpret this datetime.

To Reproduce

Steps to reproduce the behavior:

  1. Turn on OSMT
  2. Create at least one collection, and publish it.
  3. Request GET /api/collections
  4. Observe no TZ indicator on publishDate, and other dates.

Expected behavior

Server should know what time zone it's running in. Datetimes should be serialized in UTC with a "Z" timezone identifier. Best to save them to the database in UTC if possible, but translation to UTC at API request time is OK too.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions