php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #18424 results of gmdate("U") and date("U") are not different!
Submitted: 2002-07-18 17:11 UTC Modified: 2002-07-18 17:15 UTC
From: kirill_sobaka_mail at rambler dot ru Assigned:
Status: Not a bug Package: Date/time related
PHP Version: 4.2.1 OS: Win32
Private report: No CVE-ID: None
View Developer Edit
Welcome! If you don't have a Git account, you can't do anything here.
If you reported this bug, you can edit this bug over here.
(description)
Block user comment
Status: Assign to:
Package:
Bug Type:
Summary:
From: kirill_sobaka_mail at rambler dot ru
New email:
PHP Version: OS:

 

 [2002-07-18 17:11 UTC] kirill_sobaka_mail at rambler dot ru
Hellow!

PHP Script:
<?php
#the 1 part
echo gmdate("H:i d/m/Y") . "\n";
echo date("H:i d/m/Y") . "\n";

#the 2 part
echo gmdate("U") . "\n";
echo date("U") . "\n";
?>

please, try it! and you will see, that results in the 2 part not different! Why?

Patches

Pull Requests

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2002-07-18 17:15 UTC] derick@php.net
Thank you for taking the time to write to us, but this is not
a bug. Please double-check the documentation available at
http://www.php.net/manual/ and the instructions on how to report
a bug at http://bugs.php.net/how-to-report.php

From the manual: #

U - seconds since the Unix Epoch (January 1 1970 00:00:00 GMT)

That means U always takes the time zone into account.

Derick
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Fri Dec 27 00:01:30 2024 UTC