php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Request #14043 gmtime() function would be nice
Submitted: 2001-11-13 14:00 UTC Modified: 2001-11-13 14:12 UTC
From: webmaster at mumineen dot org Assigned:
Status: Not a bug Package: Feature/Change Request
PHP Version: 4.0.6 OS:
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: webmaster at mumineen dot org
New email:
PHP Version: OS:

 

 [2001-11-13 14:00 UTC] webmaster at mumineen dot org
It would be great to have a gmtime() function, just like the other "gm" time functions.

Currently, we use something to the effect of:

function gmtime()
{

    $t = time();
    $gm_time = gmdate('D M ',$t).sprintf('%2d',(int)gmdate('d',$t)).gmdate(' H:i:s Y',$t);
    return strtotime($gm_time);

}

Patches

Pull Requests

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2001-11-13 14:12 UTC] jimw@php.net
the output of time() is already in gmt.
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Sun Dec 22 11:01:30 2024 UTC