boredzo / iso-8601-date-formatter

A Cocoa NSFormatter subclass to convert dates to and from ISO-8601-formatted strings. Supports calendar, week, and ordinal formats.
http://boredzo.org/iso8601dateformatter/
Other
600 stars 140 forks source link

Time-only behavior is broken #30

Closed boredzo closed 8 years ago

boredzo commented 11 years ago

Parsing a time-only string such as “T14:23-0800” will produce a string with the wrong date when the current local date is within the specified time zone offset from the next day UTC.

This is caused by #29. The underlying dateComponentsFromString: methods interpolate the current local date into the components, and dateFromString: then interprets those components in the specified time zone, creating a date that's a day too early (or, presumably, in some time zones, late).

boredzo commented 9 years ago

Apparently 3cb3921 (XCTest conversion) reinstated these tests by accident! Oops.