Edit report at http://bugs.php.net/bug.php?id=52633&edit=1
ID: 52633 Comment by: anton85s at mail dot ru Reported by: avani at aspl dot in Summary: Date() / mktime() function were generating error .. Status: Bogus Type: Bug Package: Date/time related Operating System: FC11 PHP Version: 5.3.3 Block user comment: N New Comment: IT IS a bug, because PHP is NOT an operating system, it is just a software package, and it should not require the OS user to set the timezone settings each time in each application he/she is going to change it. Most not-time-specialized software packages should rely on system settings and should not require the user to change it all manually. For example, user John moves with his laptop from one timezone to another each 2 days. He has 100 software packages installed in his laptop, and he should be able to change the timezone _only_ by modifying the system settings once, not 101 times each time he changes the timezone. Therefore, such warning is certainly erroneous and is an actual bug which has to be fixed. The correct way to do it is to implement a separate setting in ini file or elsewhere whether time and date functions should rely on application-specific time settings or system time settings. Previous Comments: ------------------------------------------------------------------------ [2010-08-18 11:03:12] ahar...@php.net This isn't a bug: the error message explains exactly what's happening and what you need to do to fix it. Please follow it up with a support channel if you're still unclear on the problem. ------------------------------------------------------------------------ [2010-08-18 10:53:09] avani at aspl dot in mktime() [function.mktime]: 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 'Asia/Calcutta' for 'IST/5.0/no DST' instead in /PATH/nf_statCounter.inc on line 21 ------------------------------------------------------------------------ [2010-08-18 10:51:28] avani at aspl dot in Description: ------------ Warning: date() [function.date]: 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 'Asia/Calcutta' for 'IST/5.0/no DST' instead in /PATH/nf_common.inc on line 162 Test script: --------------- <?php echo $c=date('Y'); ?> ------------------------------------------------------------------------ -- Edit this bug report at http://bugs.php.net/bug.php?id=52633&edit=1