Skip to content

Does not respect offset for format (time) UTC[+-]NNNN #158

@klondikedragon

Description

@klondikedragon

Currently it will parse Mon, 1 Dec 2008 14:48:22 GMT-07:00 into 2008-12-01 21:48:22 +0000 UTC (giving special treatment to GMT[+-]NNNN as really another way of just specifying the offset [+-]NNNN.

This makes sense, as this syntax is a way of specifying a timezone as an offset from GMT or UTC.

However, it currently does not give the same special treatment to Mon, 1 Dec 2008 14:48:22 UTC-07:00 -- instead it will just treat this as the UTC time zone and ignore the specified offset (this is due to the special parsing rules of how golang time.Parse always recognizes the "UTC" time zone abbreviation).

For consistency and accuracy, it should treat these cases the same and recognize the offset.

A PR will be opened that fixes this behavior, this is documenting the need/enhancement.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions