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 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: 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

Add a Patch

Pull Requests

Add a Pull Request

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: Fri Mar 29 09:01:28 2024 UTC