php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #52304 warning message
Submitted: 2010-07-11 14:00 UTC Modified: 2010-07-11 19:42 UTC
From: milicicivan3510 at gmail dot com Assigned:
Status: Not a bug Package: Date/time related
PHP Version: 5.3SVN-2010-07-11 (snap) OS: Windows XP
Private report: No CVE-ID: None
 [2010-07-11 14:00 UTC] milicicivan3510 at gmail dot com
Description:
------------
This appears:
Warning: strtotime() [function.strtotime]: It is not safe to rely on the system's timezone settings. You are *required* to use the date.timezone setting or the date_default_timezone_set() function. In case you used any of those methods and you are still getting this warning, you most likely misspelled the timezone identifier. We selected 'Europe/Paris' for '2.0/DST' instead in C:\xampp\htdocs\something.php on line 7
Distance between 2 dates is 3 days.
What I must do (write) that this message doesn't appear any more?

Test script:
---------------
<?php
$iStartDate = '2010-05-29';
$iEndDate = '2010-06-01';
printf
(
'Distance between 2 dates is %d days.',
(strtotime($iEndDate) - strtotime($iStartDate)) / 86400
);
?>

Expected result:
----------------
Distance between 2 dates is 3 days.


Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2010-07-11 19:42 UTC] johannes@php.net
-Status: Open +Status: Bogus
 [2010-07-11 19:42 UTC] johannes@php.net
Sorry, but your problem does not imply a bug in PHP itself.  For a
list of more appropriate places to ask for help using PHP, please
visit http://www.php.net/support.php as this bug system is not the
appropriate forum for asking support questions.  Due to the volume
of reports we can not explain in detail here why your report is not
a bug.  The support channels will be able to provide an explanation
for you.

Thank you for your interest in PHP.

The error message is quite verbose ...
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Mon May 20 15:01:36 2024 UTC