Try to read following : or read help of mktime() in manual
However, there is one thing you may want to take note
of...namely INTEGER limitations. Apparently the mktime() function
returns the UNIX time conversion of a date where the values
represent seconds since Jan 1, 1970, and are positive or
negative depending on whether the date appears before or after
1970. Due to the MAX_INT (LONG?) size, dates can only be
represented as far back as 1902 (- MAX) and as far forward as
2037 (+ MAX).
Also, the addition of any field that might exceed the max_int
limitation itself will cause an invalid calculation and reset the date
to Dec 31, 1969 (Unix time of -1).
EX:
$day_shift = 36524;
$stmp = mktime(0,0,0,1,$day_shift,1903);
it will produce output -1 .
why ? because
// 36524 days == 3155673600 secs)
In this case, the 3155673600 shift is too large for the mktime() function to compute, so you end up with -1. However, if you do your same shift in smaller increments (say 10,000 days at a time) the calculations will work and you'll be fine 😉