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
View Add Comment Developer Edit
Anyone can comment on a bug. Have a simpler test case? Does it work for you on a different platform? Let us know!
Just going to say 'Me too!'? Don't clutter the database with that please !
Your email address:
MUST BE VALID
Solve the problem:
20 - 11 = ?
Subscribe to this entry?

 
 [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: Wed Apr 24 22:01:30 2024 UTC