{
    "mode": "perldoc",
    "parameter": "Time::gmtime",
    "section": "",
    "url": "https://www.chedong.com/phpMan.php/perldoc/Time%3A%3Agmtime/json",
    "generated": "2026-05-30T06:08:10Z",
    "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,\nreplacing it with a version that returns \"Time::tm\" objects. This object\nhas methods that return the similarly named structure field name from\nthe 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\nnamespace as regular variables using the :FIELDS import tag. (Note that\nthis still overrides your core functions.) Access these fields as\nvariables named with a preceding \"tm\" in front their method names.\nThus, \"$tmobj->mday()\" corresponds to $tmmday if you import the\nfields.\n\nThe gmctime() function provides a way of getting at the scalar sense of\nthe original CORE::gmtime() function.\n\nTo access this functionality without the core overrides, pass the \"use\"\nan empty import list, and then access function functions with their full\nqualified names. On the other hand, the built-ins are still available\nvia the \"CORE::\" pseudo-package.\n",
            "subsections": []
        },
        "NOTE": {
            "content": "While this class is currently implemented using the Class::Struct module\nto build a struct-like class, 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": []
}