3 thoughts on “Leap seconds

  1. Correct me if I’m wrong, but isn’t using strtotime() a safe way to do it? I only use $date = date('Y-m-d', strtotime('+1 day', strtotime($date))); in my own code for date increments. At least this way I delegate the responsibility ;).

  2. Excellent. Yes, strtotime() should be enough. I didn’t realize it let you do increments. Thanks ramin!

    One of the things I’ve been wondering is what numeric value you get when you have a fall daylight savings time (where your time gets set back an hour). In that case, you’ll have two times that are the same time (i.e. two 1:30am’s). Each has a unique reference point in UTC, but strtotime has to arbitrarily pick one when you ask for a timestamp in that limbo period.

  3. What about spring? On the day the shift to daylight time occurs, there is no 2:30 am. What should/does it do when given the previous date with that time and asked to increment one day?

SHARE YOUR THOUGHTS