NSDateFormatter timeStyle NSDateFormatterFullStyle for dates earlier than 1970?
NSDateFormatter timeStyle NSDateFormatterFullStyle for dates earlier than 1970?
- Subject: NSDateFormatter timeStyle NSDateFormatterFullStyle for dates earlier than 1970?
- From: Steve Mykytyn <email@hidden>
- Date: Wed, 11 Jun 2014 11:10:17 -0700
NSDateFormatter (iOS) does not produce time zone names (or abbreviations)
prior to January 1, 1970, instead shifting to the "GMT-08:00" style.
Is this a bug or a feature? Judging from the tz database, it should be
able to produce names prior to 1970 if I understand tz correctly.
NSDateFormatter does correctly interpret the actual changes in time, so
that you can see the constant daylight savings in the US during World War
II, and the change from LMT (local mean time) to Standard Rail Time on
November 18, 1883.
There were certainly names for time zones, such as "Eastern War Time"
during WW II, and the tz database does contain references to W, for
example, as a letter for constructing time zone abbreviations.
Running backwards, NSDateFormatter for "Americas/Los_Angeles" produces
-- Tuesday, June 10, 2014 at 12:00:00 PM Pacific Daylight Time
-- Saturday, March 8, 2014 at 11:00:00 AM Pacific Standard Time
-- Saturday, November 2, 2013 at 12:00:00 PM Pacific Daylight Time
-- Saturday, October 24, 1970 at 12:00:00 PM Pacific Daylight Time
-- Saturday, April 25, 1970 at 11:00:00 AM Pacific Standard Time
-- Wednesday, December 31, 1969 at 11:00:00 AM GMT-08:00
-- Saturday, October 25, 1969 at 12:00:00 PM GMT-07:00
-- Saturday, September 23, 1950 at 12:00:00 PM GMT-07:00
-- Saturday, April 29, 1950 at 11:00:00 AM GMT-08:00
-- Friday, December 31, 1948 at 12:00:00 PM GMT-07:00
-- Saturday, March 13, 1948 at 11:00:00 AM GMT-08:00
-- Saturday, September 29, 1945 at 12:00:00 PM GMT-07:00
-- Sunday, February 8, 1942 at 11:00:00 AM GMT-08:00
-- Saturday, October 25, 1919 at 12:00:00 PM GMT-07:00
-- Saturday, March 29, 1919 at 11:00:00 AM GMT-08:00
-- Saturday, October 26, 1918 at 12:00:00 PM GMT-07:00
-- Saturday, March 30, 1918 at 11:00:00 AM GMT-08:00
-- Sunday, November 18, 1883 at 11:07:02 AM GMT-07:52:58
_______________________________________________
Cocoa-dev mailing list (email@hidden)
Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden