使用PHP中的strtotime()将字符串转换为时间时,它会增加一个小时,为什么?

When I am converting date using strtotime() function it automatically added 1 hour in existing date.

For example:

$PublishDate = "1/13/2012 **17**:0";
echo strtotime($PublishDate);

// OUTPUT : 1/13/2012 **18**:0

Why 1 hour is incremented automatically?

Something odd is going on here. strtotime() converts attempts to convert a string representation of a date to the Unix time format (see the strtotime() documentation). Unix time is the total number of seconds since January 1st, 1970. This ends up being a large number, such as 1326723022 (the current Unix time as of writing). You can read more about Unix time here.

strtotime() should ALWAYS return either a 32 bit integer or FALSE (-1 in older versions of php).