NSDate issue with UTC Offset and Time Zones
I am pulling a date from a server in ISO 8601 format. The date represents
the time a specific episode of a specific show airs. Here is an example
date:
"2013-07-30T21:00:00-05:00"
That is July 30th, 2013 at 9:00PM EST. EST being -05:00. The problem comes
in when I try and display the date back to the user(myself in this case).
I am currently in central time but daylight savings time is active. Which
means iOS says that I am currently in Central Daylight Time which is also
-05:00(normal CST is -06:00).
This show airs in my CST time zone at 8:00PM. It doesn't matter if
daylight savings time is on or off, the show always airs whenever the
clock hits 8:00PM. Normally if I wasn't in daylight savings time iOS would
be able to do the proper conversions as it would be moving from -05:00 to
-06:00. SInce I am currently in daylight savings time though it sees
-05:00 as the original offset and -05:00 as my current offset so it does
no conversion and displays the show starting at 9:00PM. Any idea how to
deal with this?
No comments:
Post a Comment