|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
[2011-03-14 23:58 UTC] sunco007 at hotmail dot com
Description:
------------
Want to get the date without any calculations and i got it wrong
Is 15:54:09 and Php..
date("H:i:s") returns me 22:54:09
date("h:i:s") returns me 10:54:09
Maybe you need to check exactly on March 14 2011 to see the same result as me
Test script:
---------------
<?
echo date("H:i:s");
// or
echo date("h:i:s");
?>
Expected result:
----------------
Current time
Actual result:
--------------
The time +7 hours
PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
|
|||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Sun Dec 07 01:00:01 2025 UTC |
Set your timezone. You are getting UTC back. date_default_timezone_set('America/Denver');Or I guess you are Pacific actually. Then use: date_default_timezone_set('America/Los_Angeles');