php mktime for epoch returns -3600, not 0

djrikyx

New Member
If I run the following in PHP:echo mktime(0,0,0,1,1,1970);the returned value is -3600, not 0 as I expected.The server is UK based, it's currently 21 Sep (i.e. BST summertime) (though I wouldn't expect this to affect the epoch timestamp) and per php.info: "Default timezone Europe/London".Setting the daylight saving time flag also, as follows, gives:echo mktime(0,0,0,1,1,1970,0); (i.e. the correct DST flag, 0 as 1 Jan not DST/BST)returns -3600echo mktime(0,0,0,1,1,1970,1); (the incorrect flag - setting 1 Jan as DST)returns -7200echo mktime(0,0,0,1,1,1970,-1); (i.e. DST flag not set - left to PHP to decide)returns -3600 Does anyone know why the epoch would be returned as -3600, not 0, please?
 
Back
Top