I don't think that's a valid timestamp. From http://en.wikipedia.org/wiki/12-hour_clock#Confusion_at_noon_and_midnight
The 24-hour clock notation avoids all of those ambiguities by using 00:00 for midnight at the start of the day and 12:00 for noon. From 23:59:59 the time shifts (one second later) to 00:00:00, the beginning of the next day. In 24-hour notation 24:00 can be used to refer to midnight at the end of a day. Might be sloppy writing because that last sentence seems to contradict the first one. At any rate, I wouldn't expect that to be valid. What is 24:00:01 ? Pat On Sep 27, 2011, at 1:47 PM, Chris Cunningham wrote: > Hi. This behavior tricked me and I'm curious if this is inteded or > not. If you take a timestamp from a string, and the hour is 24:00:00, > then it will assume that the time is at the beginning of the day, that > is, 23+ hours before the timestamp that starts at 23:59:59. > > TimeStamp fromString: '2011-09-27 24:00:00' -> '27 September 2011 12:00 am' > > I would have hoped that would either be the end of the day, or the > begining of the next one. > > So, is this expected behaviour? > > Thanks, > Chris >
