aws / amazon-ecs-init

ecs-init is now part of the amazon-ecs-agent repo https://github.com/aws/amazon-ecs-agent/tree/master/ecs-init
https://github.com/aws/amazon-ecs-agent
Apache License 2.0
200 stars 117 forks source link

Change CHANGELOG_MASTER to RFC3339 to fix UTC/Local issues #320

Closed sparrc closed 4 years ago

sparrc commented 4 years ago

Summary

RFC1123 seems to always parse the time in local time despite having a timezone in the timestamp, according to the go docs (https://golang.org/pkg/time):

Note that the RFC822, RFC850, and RFC1123 formats should be applied only to local times. Applying them to UTC times will use "UTC" as the time zone abbreviation, while strictly speaking those RFCs require the use of "GMT" in that case. In general RFC1123Z should be used instead of RFC1123 for servers that insist on that format, and RFC3339 should be preferred for new protocols. RFC3339, RFC822, RFC822Z, RFC1123, and RFC1123Z are useful for formatting; when used with time.Parse they do not accept all the time formats permitted by the RFCs. The RFC3339Nano format removes trailing zeros from the seconds field and thus may not sort correctly once formatted.

changing CHANGELOG_MASTER to RFC3339 as this is the preferred time format.

Implementation details

Testing

ran on both laptop set to PDT and "cloud desktop" set to UTC and got the same results.

Description for the changelog

Licensing

This contribution is under the terms of the Apache 2.0 License: