Search code examples
phpdatetimeutcstrtotimetimezone-offset

PHP parse date with Timezone+Offset using strtotime()


PHP's strtotime("2015-05-11 00:03:24 UTC+1") gives me the unix timestamp 1431302604. But the timestamp should be 1431299004.

Am I wrong? Or how can I correctly parse this date with PHP 5.4.


Solution

  • Try strtotime("2015-05-11 00:03:24+01:00")