PM Me Your AM
We just released v2.0.1 of Pocket Weather AU and v1.0.2 of Pocket Weather World to Apple. Exciting isn’t it! Well not really, as the minor number increments betray, they are both bug fix releases. In this case it’s a bizarre bug that took a little while to get to the bottom of. If you’re not technically minded, then feel free to go browse digg or something instead, here goes:
NSDateFormatter *dateFormatter = [[NSDateFormatter alloc] init];
So what the above code is meant to do (once you give it a date) is to give it back to you in the format you asked for it. That’s what the doco says, and that’s what 99 times out of 100 it does. So a typical result might look like ‘20091108123301’ (for today). On some iPhones (and we have no idea what causes this) you get ‘20091108123301 PM‘. Yeah that’s right, you get ‘PM’ or ‘AM’ at the end even though you didn’t ask for it. This only happens to iPhones that are set to AM/PM time, but most of them behave, like we said it seems to be very rare indeed that you get this outcome.
Anyway the workaround for our users is to set their iPhone to 24 hour time. The code workaround is to do the following:
We’re just glad we got to the bottom of this diabolical bug, so we can get back to adding new features and tweaking existing ones 🙂