Bug #78616 [NEW]: unexpected behaviour of date function
| From: | tanmuhittin at gmail dot com | Date: | Tue, 01 Oct 2019 06:45:59 +0000 |
| Subject: | Bug #78616 [NEW]: unexpected behaviour of date function | ||
| Groups: | php.bugs | ||
| Request: | Send a blank email to php-bugs+get-222970@lists.php.net to get a copy of this message | ||
From: tanmuhittin at gmail dot com
Operating system: ubuntu
PHP version: Irrelevant
Package: Date/time related
Bug Type: Bug
Bug description:unexpected behaviour of date function
Description:
------------
especially when using date function with strtotime this behavior may
result problems since strtotime returns false when invalid argument is
supplied but date function will not
Test script:
---------------
<?php
echo date('Y-m-d',false);
echo date('Y-m-d',0);
Expected result:
----------------
false
01-01-1970
Actual result:
--------------
01-01-1970
01-01-1970
--
Edit bug report at https://bugs.php.net/bug.php?id=78616&edit=1
--
Fix committed: https://bugs.php.net/fix.php?id=78616&r=fixed
Fixed in release: https://bugs.php.net/fix.php?id=78616&r=alreadyfixed
Need backtrace: https://bugs.php.net/fix.php?id=78616&r=needtrace
Need Reproduce Script: https://bugs.php.net/fix.php?id=78616&r=needscript
Try newer version: https://bugs.php.net/fix.php?id=78616&r=oldversion
Not developer issue: https://bugs.php.net/fix.php?id=78616&r=support
Expected behavior: https://bugs.php.net/fix.php?id=78616&r=notwrong
Not enough info: https://bugs.php.net/fix.php?id=78616&r=notenoughinfo
Submitted twice: https://bugs.php.net/fix.php?id=78616&r=submittedtwice
register_globals: https://bugs.php.net/fix.php?id=78616&r=globals
PHP version support discontinued: https://bugs.php.net/fix.php?id=78616&r=phptooold
Daylight Savings: https://bugs.php.net/fix.php?id=78616&r=dst
IIS Stability: https://bugs.php.net/fix.php?id=78616&r=isapi
Install GNU Sed: https://bugs.php.net/fix.php?id=78616&r=gnused
Floating point limitations: https://bugs.php.net/fix.php?id=78616&r=float
No Zend Extensions: https://bugs.php.net/fix.php?id=78616&r=nozend
MySQL Configuration Error: https://bugs.php.net/fix.php?id=78616&r=mysqlcfg