|  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Request #78459 Please Provide The Feture Of AM/PM Comparission.
Submitted: 2019-08-26 16:12 UTC Modified: 2019-08-26 16:27 UTC
Avg. Score:3.0 ± 0.0
Reproduced:1 of 1 (100.0%)
Same Version:1 (100.0%)
Same OS:1 (100.0%)
From: tpatel6964 dot sd at gmail dot com Assigned:
Status: Wont fix Package: Date/time related
PHP Version: 7.4Git-2019-08-26 (Git) OS: Windows 10 64-Bit
Private report: No CVE-ID: None
Have you experienced this issue?
Rate the importance of this bug to you:

 [2019-08-26 16:12 UTC] tpatel6964 dot sd at gmail dot com
From manual page:
Please Make A Feture Of Comparing Time in AM/PM Like example Is Given Below:

Test script:
$date = date_default_timezone_set('Asia/Kolkata');
$Darshanfrom="5:00 AM";
$Darshanto="9:00 PM";
$today=date("g:i A");
if($today>=$Darshanfrom && $today<=$Darshanto)
		echo"The Meassgae Is Here";
               echo"The Message Is Here!";

Expected result:
if the condition is true then it will be redirected to header location else it will be print the echo massge

Actual result:
it Will Always Print The Else Part 


Add a Patch

Pull Requests

Add a Pull Request


AllCommentsChangesGit/SVN commitsRelated reports
 [2019-08-26 16:14 UTC]
-Status: Open +Status: Wont fix
 [2019-08-26 16:14 UTC]
Use zero-padded 24-hour times without an "am/pm". That's the "H:i" format.
 [2019-08-26 16:23 UTC] tpatel6964 dot sd at gmail dot com
But This Is Not Working I Will Also Tried That Logic.
There Is Another Way TO Implement It???
 [2019-08-26 16:27 UTC]
Sorry, but your problem does not imply a bug in PHP itself.  For a
list of more appropriate places to ask for help using PHP, please
visit as this bug system is not the
appropriate forum for asking support questions.  Due to the volume
of reports we can not explain in detail here why your report is not
a bug.  The support channels will be able to provide an explanation
for you.

Thank you for your interest in PHP.
PHP Copyright © 2001-2023 The PHP Group
All rights reserved.
Last updated: Mon Jan 30 09:05:52 2023 UTC