note 34852 deleted from function.mktime by didou
| From: | didou@php.net | Date: | Fri, 08 Aug 2003 15:05:47 +0000 |
| Subject: | note 34852 deleted from function.mktime by didou | ||
| References: | 1 | Groups: | php.notes |
| Request: | Send a blank email to php-notes+get-53652@lists.php.net to get a copy of this message | ||
Note Submitter: carinato@tin.it
----
After a day of tests, I have found my script error:
I must do a date difference using a simple calculation:
$diff_date_days = ($timestamp_2 - timestamp_1) / 86400;
this is ok but the $timestamps must be calculated with:
$timestamp = gmmktime(0,0,0,$month,$day,$year) or
$timestamp = mktime(0,0,0,$month,$day,$year,0) or
$timestamp = mktime(0,0,0,$month,$day,$year,1)
but not with:
$timestamp = mktime(0,0,0,$month,$day,$year) !!!!!
infact the daylight savings time can change !!