Doc #78120 [NEW]: No more warning for missing timezone

From: Date: Thu, 06 Jun 2019 11:55:04 +0000
Subject: Doc #78120 [NEW]: No more warning for missing timezone
Groups: php.doc.bugs 
Request: Send a blank email to doc-bugs+get-16712@lists.php.net to get a copy of this message
From:             laurent dot lyaudet at gmail dot com
Operating system: Debian 9.7
PHP version:      7.1.30
Package:          Documentation problem
Bug Type:         Documentation Problem
Bug description:No more warning for missing timezone

Description:
------------
---
From manual page: https://php.net/function.date-default-timezone-set
---
The documentation contains
"
    Note:

    Since PHP 5.1.0 (when the date/time functions were rewritten), every
call to a date/time function will generate a E_NOTICE if the timezone
isn't valid, and/or a E_WARNING message if using the system settings or
the TZ environment variable.
"
However, I don't have any warning issued when I run the function date
without timezone on Debian 9.7.

root@StretchDevNewLaurent:/home/web/teliway.com/appli# 
  grep -r 'date.timezone' /etc/php/7.0/
/etc/php/7.0/apache2/php.ini:; http://php.net/date.timezone
/etc/php/7.0/apache2/php.ini:;date.timezone =
/etc/php/7.0/phpdbg/php.ini:; http://php.net/date.timezone
/etc/php/7.0/phpdbg/php.ini:;date.timezone =
/etc/php/7.0/cli/php.ini:; http://php.net/date.timezone
/etc/php/7.0/cli/php.ini:;date.timezone =




Test script:
---------------
<?php
echo date('Ymd');
1/0;
?>
20190606PHP Warning:  Division by zero in - on line 3
PHP Stack trace:
PHP   1. {main}() -:0

Warning: Division by zero in - on line 3

Call Stack:
   21.1228     344160   1. {main}() -:0




-- 
Edit bug report at https://bugs.php.net/bug.php?id=78120&edit=1
-- 
Try a snapshot (PHP 5.4):   https://bugs.php.net/fix.php?id=78120&r=trysnapshot54
Try a snapshot (PHP 5.5):   https://bugs.php.net/fix.php?id=78120&r=trysnapshot55
Try a snapshot (trunk):     https://bugs.php.net/fix.php?id=78120&r=trysnapshottrunk
Fixed in SVN:               https://bugs.php.net/fix.php?id=78120&r=fixed
Fixed in release:           https://bugs.php.net/fix.php?id=78120&r=alreadyfixed
Need backtrace:             https://bugs.php.net/fix.php?id=78120&r=needtrace
Need Reproduce Script:      https://bugs.php.net/fix.php?id=78120&r=needscript
Try newer version:          https://bugs.php.net/fix.php?id=78120&r=oldversion
Not developer issue:        https://bugs.php.net/fix.php?id=78120&r=support
Expected behavior:          https://bugs.php.net/fix.php?id=78120&r=notwrong
Not enough info:            https://bugs.php.net/fix.php?id=78120&r=notenoughinfo
Submitted twice:            https://bugs.php.net/fix.php?id=78120&r=submittedtwice
register_globals:           https://bugs.php.net/fix.php?id=78120&r=globals
PHP 4 support discontinued: https://bugs.php.net/fix.php?id=78120&r=php4
Daylight Savings:           https://bugs.php.net/fix.php?id=78120&r=dst
IIS Stability:              https://bugs.php.net/fix.php?id=78120&r=isapi
Install GNU Sed:            https://bugs.php.net/fix.php?id=78120&r=gnused
Floating point limitations: https://bugs.php.net/fix.php?id=78120&r=float
No Zend Extensions:         https://bugs.php.net/fix.php?id=78120&r=nozend
MySQL Configuration Error:  https://bugs.php.net/fix.php?id=78120&r=mysqlcfg



Thread (5 messages)

« previous php.doc.bugs (#16712) next »