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
Welcome back! If you're the original bug submitter, here's where you can edit the bug or add additional notes.
If this is not your bug, you can add a comment by following this link.
If this is your bug, but you forgot your password, you can retrieve your password here.
Password:
Status:
Package:
Bug Type:
Summary:
From: tpatel6964 dot sd at gmail dot com
New email:
PHP Version: OS:

 

 [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: Sun Jun 16 01:01:29 2024 UTC