php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #74807 Date
Submitted: 2017-06-23 13:51 UTC Modified: 2017-06-27 18:20 UTC
From: ryanm352 at gmail dot com Assigned:
Status: Not a bug Package: Date/time related
PHP Version: 5.6.30 OS: RHEL 2.6.32-573.26.1.el6.x86_64
Private report: No CVE-ID: None
 [2017-06-23 13:51 UTC] ryanm352 at gmail dot com
Description:
------------
date() returns wrong date.

Test script:
---------------
<?php
date_default_timezone_set('America/Chicago');
echo date('l, F j, Y', 1498089600);
?>



Expected result:
----------------
Thursday, June 22, 2017

Actual result:
--------------
Wednesday, June 21, 2017

Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2017-06-27 18:20 UTC] jhdxr@php.net
-Status: Open +Status: Not a bug -Package: date_time +Package: Date/time related
 [2017-06-27 18:20 UTC] jhdxr@php.net
Thank you for taking the time to write to us, but this is not
a bug. Please double-check the documentation available at
http://www.php.net/manual/ and the instructions on how to report
a bug at http://bugs.php.net/how-to-report.php


timestamp 1498089600 is 2017 June 22 00:00:00 GMT, so for America/Chicago it's x 2017 June 21 19:00:00.
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Tue Apr 23 22:01:31 2024 UTC