CFTimeZone: name GMT offsets like Apple - #137
Closed
DTW-Thalion wants to merge 1 commit into
Closed
Conversation
CFTimeZoneCreateWithTimeIntervalFromGMT named every zone GMT+HH:MM, including GMT+00:00 for a zero offset. Apple names a zero offset GMT and others GMT followed by the signed four-digit offset with no colon. The existing basic test asserted the old names and is updated.
Contributor
Author
|
Superseded by #138, which also fixes the compact GMT abbreviation. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
CFTimeZoneCreateWithTimeIntervalFromGMT named every zone GMT+HH:MM, so a zero offset was GMT+00:00 and a five-hour offset GMT+05:00. Apple names a zero offset GMT and any other offset GMT followed by the signed four-digit offset with no colon (GMT+0500, GMT-0530).
Emit GMT for a zero offset and GMT followed by the four-digit offset otherwise.
Tests/CFTimeZone/gmt_name.m covers zero, positive, negative and half-hour offsets. The existing Tests/CFTimeZone/basic.m asserted the old GMT+00:00 name and abbreviation and is updated to GMT. Both were verified against Apple CoreFoundation.