{
    "mode": "perldoc",
    "parameter": "Time::gmtime",
    "section": "",
    "url": "https://www.chedong.com/phpMan.php/perldoc/Time%3A%3Agmtime/json",
    "generated": "2026-06-10T16:25:27Z",
    "synopsis": "use Time::gmtime;\n$gm = gmtime();\nprintf \"The day in Greenwich is %s\\n\",\n(qw(Sun Mon Tue Wed Thu Fri Sat Sun))[ $gm->wday() ];\nuse Time::gmtime qw(:FIELDS);\ngmtime();\nprintf \"The day in Greenwich is %s\\n\",\n(qw(Sun Mon Tue Wed Thu Fri Sat Sun))[ $tmwday ];\n$now = gmctime();\nuse Time::gmtime;\nuse File::stat;\n$datestring = gmctime(stat($file)->mtime);",
    "sections": {
        "NAME": {
            "content": "Time::gmtime - by-name interface to Perl's built-in gmtime() function\n",
            "subsections": []
        },
        "SYNOPSIS": {
            "content": "use Time::gmtime;\n$gm = gmtime();\nprintf \"The day in Greenwich is %s\\n\",\n(qw(Sun Mon Tue Wed Thu Fri Sat Sun))[ $gm->wday() ];\n\nuse Time::gmtime qw(:FIELDS);\ngmtime();\nprintf \"The day in Greenwich is %s\\n\",\n(qw(Sun Mon Tue Wed Thu Fri Sat Sun))[ $tmwday ];\n\n$now = gmctime();\n\nuse Time::gmtime;\nuse File::stat;\n$datestring = gmctime(stat($file)->mtime);\n",
            "subsections": []
        },
        "DESCRIPTION": {
            "content": "This module's default exports override the core gmtime() function, replacing it with a version\nthat returns \"Time::tm\" objects. This object has methods that return the similarly named\nstructure field name from the C's tm structure from time.h; namely sec, min, hour, mday, mon,\nyear, wday, yday, and isdst.\n\nYou may also import all the structure fields directly into your namespace as regular variables\nusing the :FIELDS import tag. (Note that this still overrides your core functions.) Access these\nfields as variables named with a preceding \"tm\" in front their method names. Thus,\n\"$tmobj->mday()\" corresponds to $tmmday if you import the fields.\n\nThe gmctime() function provides a way of getting at the scalar sense of the original\nCORE::gmtime() function.\n\nTo access this functionality without the core overrides, pass the \"use\" an empty import list,\nand then access function functions with their full qualified names. On the other hand, the\nbuilt-ins are still available via the \"CORE::\" pseudo-package.\n",
            "subsections": []
        },
        "NOTE": {
            "content": "While this class is currently implemented using the Class::Struct module to build a struct-like\nclass, you shouldn't rely upon this.\n",
            "subsections": []
        },
        "AUTHOR": {
            "content": "Tom Christiansen\n",
            "subsections": []
        }
    },
    "summary": "Time::gmtime - by-name interface to Perl's built-in gmtime() function",
    "flags": [],
    "examples": [],
    "see_also": []
}