php.net |  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
Votes:1
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
View Add Comment Developer Edit
Anyone can comment on a bug. Have a simpler test case? Does it work for you on a different platform? Let us know!
Just going to say 'Me too!'? Don't clutter the database with that please — but make sure to vote on the bug!
Your email address:
MUST BE VALID
Solve the problem:
38 + 4 = ?
Subscribe to this entry?

 
 [2019-08-26 16:12 UTC] tpatel6964 dot sd at gmail dot com
Description:
------------
---
From manual page: https://php.net/refs.calendar
---
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";
		header("Location: https://www.sai.org.in/en/sai-video-popup");
}
else
{
               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 

Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2019-08-26 16:14 UTC] requinix@php.net
-Status: Open +Status: Wont fix
 [2019-08-26 16:14 UTC] requinix@php.net
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] requinix@php.net
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 http://www.php.net/support.php 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-2024 The PHP Group
All rights reserved.
Last updated: Fri Apr 19 15:01:28 2024 UTC