Skip to content

Date format generated by formatRFC3339 is incompatible with Golang standard lib RFC3339! #1911

@derpycoder

Description

@derpycoder

The documentation for formatRFC3339 suggests following output in comment:

// Represent 18 September 2019 in ISO 3339 format:
const result = formatRFC3339(new Date(2019, 8, 18, 19, 0, 52))
//=> '2019-09-18T19:00:52Z'

However, what it actually outputs is:

//-> '2019-09-18T19:00:52+5.5:30'

Which doesn't sit well with Golang standard lib, RFC3339 format!

Replace the prior date with later date in Go Playground and you'll see the issue.

P.S. I used StackBlitz to run date-fns.

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions