Skip to content

CFTimeZone: name GMT offsets like Apple - #137

Closed
DTW-Thalion wants to merge 1 commit into
gnustep:masterfrom
DTW-Thalion:fix/cftimezone-gmt-format
Closed

CFTimeZone: name GMT offsets like Apple#137
DTW-Thalion wants to merge 1 commit into
gnustep:masterfrom
DTW-Thalion:fix/cftimezone-gmt-format

Conversation

@DTW-Thalion

Copy link
Copy Markdown
Contributor

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.

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.
@DTW-Thalion

Copy link
Copy Markdown
Contributor Author

Superseded by #138, which also fixes the compact GMT abbreviation.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

1 participant