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
Welcome back! If you're the original bug submitter, here's where you can edit the bug or add additional notes.
If you forgot your password, you can retrieve your password here.
Password:
Status:
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 15:01:29 2024 UTC