|  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #72773 php_date_timestamp_set() does not initialize have_date and have_time
Submitted: 2016-08-07 13:34 UTC Modified: 2018-03-18 17:23 UTC
From: Assigned: cmb (profile)
Status: Closed Package: Date/time related
PHP Version: 5.6Git-2016-08-07 (Git) OS: *
Private report: No CVE-ID: None
 [2016-08-07 13:34 UTC]
php_date_timestamp_set()[1] does not properly initialize the
have_date and have_time members of the timelib_time struct. Both
should be 1, but actually are 0.

The supplied test script reveals this behavior in the debugger

I'm not sure whether this should be fixed in
php_date_timestamp_set(), or rather in timelib_update_ts() or
maybe initializetimelib_unixtime2local().

[1] <>

Test script:

date_timestamp_set(date_create(), 1);


Add a Patch

Pull Requests

Add a Pull Request


AllCommentsChangesGit/SVN commitsRelated reports
 [2017-02-12 19:42 UTC]
have_time and have_date are very much internal flags, and should not have been exposed in user land at all.
 [2018-03-18 17:23 UTC]
-Status: Open +Status: Closed -Assigned To: +Assigned To: cmb
 [2018-03-18 17:23 UTC]
> […] and should not have been exposed in user land at all.

They have not been exposed to userland, so presumably, everything
is fine.  Sorry for the noise.
PHP Copyright © 2001-2021 The PHP Group
All rights reserved.
Last updated: Tue May 11 22:01:23 2021 UTC