PHP strtotime returning wrong results

后端 未结 3 1497
再見小時候
再見小時候 2020-12-22 12:28

strtotime(\'3rd January,2010\') returns 1230993600 in GMT+5:30.

While according to this, unix timestamp 1230993600 is 3rd January,2009. So it\'s off

3条回答
  •  甜味超标
    2020-12-22 12:59

    When you have a comma after the month, it assumes that 2010 is military time instead of the year. If you want it to interpret 2010 as the year, omit the comma.

提交回复
热议问题