CINXE.COM
Time::Local - Efficiently compute time from local and GMT time - metacpan.org
<!DOCTYPE html> <html lang="en-US"> <head> <title>Time::Local - Efficiently compute time from local and GMT time - metacpan.org</title> <link rel="preload" as="fetch" href="/account/login_status" crossorigin="anonymous" /> <link href="/assets/style-XFEQ536G.css" rel="stylesheet" type="text/css"> <script src="/assets/main-WXBSEDQJ.js" type="module"></script> <link rel="alternate" type="application/rss+xml" title="Recent CPAN Uploads of Time-Local - MetaCPAN" href="/dist/Time-Local/releases.rss" /> <link rel="canonical" href="https://metacpan.org/pod/Time::Local" /> <meta name="description" content="Efficiently compute time from local and GMT time" /> <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=5"> <link rel="shortcut icon" href="/static/icons/favicon.ico"> <link rel="apple-touch-icon" sizes="152x152" href="/static/icons/apple-touch-icon.png"> <link rel="search" href="/static/opensearch.xml" type="application/opensearchdescription+xml" title="MetaCPAN"> <script async src="https://perl-ads.perlhacks.com/perl-ads.js"></script> <script async src="https://www.googletagmanager.com/gtag/js?id=G-E82Q2V8LVD"></script> <meta property="og:site_name" content="MetaCPAN" /> <meta name="twitter:site" content="@metacpan" /> <meta property="og:type" content="article" /> <meta name="twitter:card" content="summary" /> <meta property="og:url" content="https://metacpan.org/pod/Time::Local" /> <meta property="og:title" content="Time::Local" /> <meta property="og:description" content="Efficiently compute time from local and GMT time" /> <meta property="og:image" content="https://metacpan.org/static/images/dots.png" /> </head> <body> <nav class="navbar navbar-default" role="navigation"> <div class="header-logo-large hidden-xs"> <a href="/" tabindex="0"> <svg class="logo" aria-label="MetaCPAN"> <use class="logo" href="/static/images/metacpan-logo.svg#logo" /> </svg> </a> </div> <div class="header-logo-icon visible-xs"> <a href="/"> <svg class="logo" aria-label="MetaCPAN"> <use class="logo" href="/static/images/metacpan-logo.svg#dots" /> </svg> </a> </div> <ul class="nav navbar-nav menu-items hidden-xs hidden-sm"> <li><a href="/about">About</a></li> <li><a href="/about/sponsors">Sponsor</a></li> <li><a href="https://grep.metacpan.org/">grep::cpan</a></li> <li><a href="/recent">Recent</a></li> <li><a href="/about/faq">FAQ</a></li> <li><a href="/tools">Tools</a></li> <li><a href="https://fastapi.metacpan.org/">API</a></li> </ul> <ul class="nav navbar-nav navbar-right"> <button type="button" class="searchbar-btn visible-xs visible-sm"> <i class="fa fa-search button-fa-icon"></i> </button> <form action="/search" class="searchbar-form visible-md visible-lg search-form form-horizontal"> <input type="hidden" name="size" id="metacpan_search-size" value="20"> <div class="form-group"> <div class="search-group"> <i class="fa fa-search"></i> <input type="text" name="q" placeholder="Search the CPAN" size="41" autocorrect="off" autocapitalize="off" spellcheck="false" id="metacpan_search-input" class="form-control" value=""> </div> </div> </form> <li class="icon-slidepanel visible-xs visible-sm"> <button data-toggle="slidepanel" data-target=".slidepanel"> <span class="button-fa-icon"> <i class="fa fa-bars slidepanel-open"></i> <i class="fa fa-times slidepanel-close"></i> </span> </button> </li> <li class="dropdown login-dropdown show-logged-in"> <button type="button" class="dropdown-toggle" data-toggle="dropdown"> <i class="fa fa-user button-fa-icon logged-in-icon" aria-hidden="true"></i> <i class="fas fa-chevron-down"></i> </button> <ul class="dropdown-menu"> <li><a href="/account/identities">Identities</a></li> <li><a href="/account/profile">Profile</a></li> <li><a href="/account/favorite/list">Favorites</a></li> <li> <a href="#" type="button" class="logout-button"> Logout </a> </li> </ul> </li> <li class="dropdown login-dropdown show-logged-out"> <button type="button" class="dropdown-toggle" data-toggle="dropdown"> <i class="fa fa-user button-fa-icon avatar-placeholder" aria-hidden="true"></i> <i class="fas fa-chevron-down"></i> </button> <ul class="dropdown-menu"> <li> <a href="/login/github"> <i class="fab fa-github fa-fw"></i> GitHub </a> </li> <li> <a href="/login/twitter"> <i class="fab fa-twitter fa-fw"></i> Twitter </a> </li> <li> <a href="/login/google"> <i class="fab fa-google fa-fw"></i> Google </a> </li> </ul> </li> <li class="dropdown login-dropdown hide-logged-in hide-logged-out"> <button> <i class="fa fa-user button-fa-icon" aria-hidden="true"></i> </button> </li> </ul> </nav> <div class="page-content "> <div id="perl-ad-target" class="top-notify-banner perl-ad-target"> </div> <nav class="sidebar"> <div class="slidepanel"> <ul class="nav-list "> <li class="nav-header no-margin-top"> <div class="ttip" data-toggle="tooltip" data-placement="bottom" title="The date that this version of Time-Local was released."> <span class="relatize">29 Apr 2023 21:22:04 UTC</span> </div> </li> <li> Distribution: <a href="/dist/Time-Local">Time-Local</a> </li> <li> Module version: 1.35 </li> <li> <a data-keyboard-shortcut="g s" href="/dist/Time-Local/source/lib/Time/Local.pm">Source</a> (<a href="/dist/Time-Local/source/lib/Time/Local.pm?raw=1">raw</a>) </li> <li> <a data-keyboard-shortcut="g b" href="/dist/Time-Local/source/lib/Time">Browse</a> (<a href="/dist/Time-Local/source/lib/Time?raw=1">raw</a>) </li> <li> <a data-keyboard-shortcut="g c" href="/dist/Time-Local/changes">Changes</a> </li> <li> <a rel="noopener nofollow" class="nopopup" href="https://metacpan.org/release/Time-Local">Homepage</a> </li> <li> <a class="nopopup" href="/dist/Time-Local/contribute">How to Contribute</a> </li> <li> <a rel="noopener nofollow" data-keyboard-shortcut="g r" href="https://github.com/houseabsolute/Time-Local">Repository</a> </li> <li> <a rel="noopener nofollow" data-keyboard-shortcut="g i" href="https://github.com/houseabsolute/Time-Local/issues">Issues</a> </li> <li> <a rel="noopener nofollow" href="http://matrix.cpantesters.org/?dist=Time-Local+1.35" title="Matrix">Testers</a> <span title="(pass / fail / na)">(<a rel="noopener nofollow" href="https://www.cpantesters.org/distro/T/Time-Local.html?oncpan=1&distmat=1&version=1.35&grade=2" style="color: #090">3196</a> / <a rel="noopener nofollow" href="https://www.cpantesters.org/distro/T/Time-Local.html?oncpan=1&distmat=1&version=1.35&grade=3" style="color: #900">48</a> / <a rel="noopener nofollow" href="https://www.cpantesters.org/distro/T/Time-Local.html?oncpan=1&distmat=1&version=1.35&grade=4">0</a>)</span> </li> <li> <a rel="noopener nofollow" href="http://cpants.cpanauthors.org/release/DROLSKY/Time-Local-1.35">Kwalitee</a> </li> <li> <div class="ttip" data-toggle="tooltip" data-placement="bottom" title="The # people with an indexing permission on Time-Local who have released something to CPAN in the last 2 years (i.e. the # people likely able to release critical fixes in a timely manner)"> Bus factor: 5 </div> </li> <li> <a rel="noopener nofollow" href="http://cpancover.com/latest/Time-Local-1.35/index.html">82.07% Coverage </a> </li> <li> License: perl_5 </li> <li class="nav-header">Activity</li> <li> <div class="activity-graph"> <img src="/dist/Time-Local/activity.svg?res=month" /> <div class="comment">24 month</div> </div> </li> <li class="nav-header">Tools</li> <li> <a itemprop="downloadUrl" href="https://cpan.metacpan.org/authors/id/D/DR/DROLSKY/Time-Local-1.35.tar.gz"> Download (<span itemprop="fileSize">45.41KB</span>)</a> </li> <li> <a href="https://explorer.metacpan.org/?url=%2Fmodule%2FDROLSKY%2FTime-Local-1.35%2Flib%2FTime%2FLocal.pm"> MetaCPAN Explorer </a> </li> <li> <a href="/dist/Time-Local/permissions"> Permissions </a> </li> <li> <a href="/dist/Time-Local/releases.rss"> Subscribe to distribution </a> </li> <li> <button class="btn btn-link" data-toggle="modal" data-target="#metacpan_install-instructions-dialog"> Install Instructions </button> </li> <li> <form action="/search"> <input type="hidden" name="q" value="dist:Time-Local"> <input type="search" name="q" placeholder="Search distribution" class="form-control tool-bar-form"> <input type="submit" style="display: none"> </form> </li> <li> <form action="https://grep.metacpan.org/search"> <input type="hidden" name="qd" value="Time-Local"> <input type="hidden" name="source" value="metacpan"> <input type="search" name="q" placeholder="grep distribution" class="form-control tool-bar-form"> <input type="submit" style="display: none"> </form> </li> <li class="version-jump"> <select class="select-navigator form-control tool-bar-form"> <option disabled selected>Jump to version</option> <option disabled value="/release/DROLSKY/Time-Local-1.35/view/lib/Time/Local.pm" >1.35 (DROLSKY on 2023-04-29)</option> <option value="/release/DROLSKY/Time-Local-1.34-TRIAL/view/lib/Time/Local.pm" >1.34-TRIAL DEV (DROLSKY on 2023-03-25)</option> <option value="/release/DROLSKY/Time-Local-1.33-TRIAL/view/lib/Time/Local.pm" >1.33-TRIAL DEV (DROLSKY on 2023-02-12)</option> <option value="/release/DROLSKY/Time-Local-1.32-TRIAL/view/lib/Time/Local.pm" >1.32-TRIAL DEV (DROLSKY on 2023-02-12)</option> <option value="/release/DROLSKY/Time-Local-1.31-TRIAL/view/lib/Time/Local.pm" >1.31-TRIAL DEV (DROLSKY on 2021-11-09)</option> <option value="/release/DROLSKY/Time-Local-1.30/view/lib/Time/Local.pm" >1.30 (DROLSKY on 2020-01-27)</option> <option value="/release/DROLSKY/Time-Local-1.29-TRIAL/view/lib/Time/Local.pm" >1.29-TRIAL DEV (DROLSKY on 2020-01-19)</option> <option value="/release/DROLSKY/Time-Local-1.28/view/lib/Time/Local.pm" >1.28 (DROLSKY on 2018-06-13)</option> <option value="/release/DROLSKY/Time-Local-1.27/view/lib/Time/Local.pm" >1.27 (DROLSKY on 2018-06-09)</option> <option value="/release/DROLSKY/Time-Local-1.26-TRIAL/view/lib/Time/Local.pm" >1.26-TRIAL DEV (DROLSKY on 2018-05-21)</option> <option value="/release/DROLSKY/Time-Local-1.25/view/lib/Time/Local.pm" >1.25 (DROLSKY on 2016-11-17)</option> <option value="/release/DROLSKY/Time-Local-1.24/view/lib/Time/Local.pm" >1.24 (DROLSKY on 2016-08-14)</option> <option value="/release/FLORA/Time-Local-1.2000/view/lib/Time/Local.pm" >1.2000 (FLORA on 2011-01-02)</option> <option value="/release/FLORA/Time-Local-1.1902-TRIAL/view/lib/Time/Local.pm" >1.1902-TRIAL DEV (FLORA on 2010-12-16)</option> <optgroup label="BackPAN">' <option value="/release/DROLSKY/Time-Local-1.2300/view/lib/Time/Local.pm" >1.2300 (DROLSKY on 2012-07-20)</option> <option value="/release/DROLSKY/Time-Local-1.2200/view/lib/Time/Local.pm" >1.2200 (DROLSKY on 2012-07-09)</option> <option value="/release/DROLSKY/Time-Local-1.2100/view/lib/Time/Local.pm" >1.2100 (DROLSKY on 2012-07-09)</option> <option value="/release/DROLSKY/Time-Local-1.1901/view/lib/Time/Local.pm" >1.1901 (DROLSKY on 2008-11-02)</option> <option value="/release/DROLSKY/Time-Local-1.19/view/lib/Time/Local.pm" >1.19 (DROLSKY on 2008-11-01)</option> <option value="/release/DROLSKY/Time-Local-1.18/view/lib/Time/Local.pm" >1.18 (DROLSKY on 2007-10-31)</option> <option value="/release/DROLSKY/Time-Local-1.17/view/lib/Time/Local.pm" >1.17 (DROLSKY on 2007-01-25)</option> <option value="/release/DROLSKY/Time-Local-1.16/view/lib/Time/Local.pm" >1.16 (DROLSKY on 2007-01-24)</option> <option value="/release/DROLSKY/Time-Local-1.15/view/lib/Time/Local.pm" >1.15 (DROLSKY on 2007-01-22)</option> <option value="/release/DROLSKY/Time-Local-1.14/view/lib/Time/Local.pm" >1.14 (DROLSKY on 2007-01-21)</option> <option value="/release/DROLSKY/Time-Local-1.13/view/lib/Time/Local.pm" >1.13 (DROLSKY on 2006-08-09)</option> <option value="/release/DROLSKY/Time-Local-1.12_01/view/lib/Time/Local.pm" >1.12_01 DEV (DROLSKY on 2006-03-31)</option> <option value="/release/DROLSKY/Time-Local-1.12/view/lib/Time/Local.pm" >1.12 (DROLSKY on 2005-12-18)</option> <option value="/release/DROLSKY/Time-Local-1.11/view/lib/Time/Local.pm" >1.11 (DROLSKY on 2005-02-09)</option> <option value="/release/DROLSKY/Time-Local-1.10/view/lib/Time/Local.pm" >1.10 (DROLSKY on 2004-04-20)</option> <option value="/release/DROLSKY/Time-Local-1.09/view/lib/Time/Local.pm" >1.09 (DROLSKY on 2004-04-07)</option> <option value="/release/DROLSKY/Time-Local-1.08/view/lib/Time/Local.pm" >1.08 (DROLSKY on 2004-04-07)</option> <option value="/release/DROLSKY/Time-Local-1.07_94/view/lib/Time/Local.pm" >1.07_94 DEV (DROLSKY on 2003-12-11)</option> <option value="/release/DROLSKY/Time-Local-1.07_93/view/lib/Time/Local.pm" >1.07_93 DEV (DROLSKY on 2003-07-24)</option> <option value="/release/DROLSKY/Time-Local-1.07_92/view/lib/Time/Local.pm" >1.07_92 DEV (DROLSKY on 2003-07-23)</option> <option value="/release/DROLSKY/Time-Local-1.07_91/view/lib/Time/Local.pm" >1.07_91 DEV (DROLSKY on 2003-07-22)</option> <option value="/release/DROLSKY/Time-Local-1.07_90/view/lib/Time/Local.pm" >1.07_90 DEV (DROLSKY on 2003-07-15)</option> <option value="/release/DROLSKY/Time-Local-1.07/view/lib/Time/Local.pm" >1.07 (DROLSKY on 2003-06-11)</option> <option value="/release/DROLSKY/Time-Local-1.06/view/lib/Time/Local.pm" >1.06 (DROLSKY on 2003-06-04)</option> <option value="/release/DROLSKY/Time-Local-1.05/view/lib/Time/Local.pm" >1.05 (DROLSKY on 2003-06-03)</option> </optgroup> </select> </li> <li class="version-diff"> <select class="select-navigator form-control tool-bar-form"> <option disabled selected>Diff with version</option> <option disabled value="/release/DROLSKY/Time-Local-1.35/diff/DROLSKY/Time-Local-1.35/lib/Time/Local.pm" >1.35 (DROLSKY on 2023-04-29)</option> <option value="/release/DROLSKY/Time-Local-1.35/diff/DROLSKY/Time-Local-1.34-TRIAL/lib/Time/Local.pm" >1.34-TRIAL DEV (DROLSKY on 2023-03-25)</option> <option value="/release/DROLSKY/Time-Local-1.35/diff/DROLSKY/Time-Local-1.33-TRIAL/lib/Time/Local.pm" >1.33-TRIAL DEV (DROLSKY on 2023-02-12)</option> <option value="/release/DROLSKY/Time-Local-1.35/diff/DROLSKY/Time-Local-1.32-TRIAL/lib/Time/Local.pm" >1.32-TRIAL DEV (DROLSKY on 2023-02-12)</option> <option value="/release/DROLSKY/Time-Local-1.35/diff/DROLSKY/Time-Local-1.31-TRIAL/lib/Time/Local.pm" >1.31-TRIAL DEV (DROLSKY on 2021-11-09)</option> <option value="/release/DROLSKY/Time-Local-1.35/diff/DROLSKY/Time-Local-1.30/lib/Time/Local.pm" >1.30 (DROLSKY on 2020-01-27)</option> <option value="/release/DROLSKY/Time-Local-1.35/diff/DROLSKY/Time-Local-1.29-TRIAL/lib/Time/Local.pm" >1.29-TRIAL DEV (DROLSKY on 2020-01-19)</option> <option value="/release/DROLSKY/Time-Local-1.35/diff/DROLSKY/Time-Local-1.28/lib/Time/Local.pm" >1.28 (DROLSKY on 2018-06-13)</option> <option value="/release/DROLSKY/Time-Local-1.35/diff/DROLSKY/Time-Local-1.27/lib/Time/Local.pm" >1.27 (DROLSKY on 2018-06-09)</option> <option value="/release/DROLSKY/Time-Local-1.35/diff/DROLSKY/Time-Local-1.26-TRIAL/lib/Time/Local.pm" >1.26-TRIAL DEV (DROLSKY on 2018-05-21)</option> <option value="/release/DROLSKY/Time-Local-1.35/diff/DROLSKY/Time-Local-1.25/lib/Time/Local.pm" >1.25 (DROLSKY on 2016-11-17)</option> <option value="/release/DROLSKY/Time-Local-1.35/diff/DROLSKY/Time-Local-1.24/lib/Time/Local.pm" >1.24 (DROLSKY on 2016-08-14)</option> <option value="/release/DROLSKY/Time-Local-1.35/diff/FLORA/Time-Local-1.2000/lib/Time/Local.pm" >1.2000 (FLORA on 2011-01-02)</option> <option value="/release/DROLSKY/Time-Local-1.35/diff/FLORA/Time-Local-1.1902-TRIAL/lib/Time/Local.pm" >1.1902-TRIAL DEV (FLORA on 2010-12-16)</option> <optgroup label="BackPAN">' <option value="/release/DROLSKY/Time-Local-1.35/diff/DROLSKY/Time-Local-1.2300/lib/Time/Local.pm" >1.2300 (DROLSKY on 2012-07-20)</option> <option value="/release/DROLSKY/Time-Local-1.35/diff/DROLSKY/Time-Local-1.2200/lib/Time/Local.pm" >1.2200 (DROLSKY on 2012-07-09)</option> <option value="/release/DROLSKY/Time-Local-1.35/diff/DROLSKY/Time-Local-1.2100/lib/Time/Local.pm" >1.2100 (DROLSKY on 2012-07-09)</option> <option value="/release/DROLSKY/Time-Local-1.35/diff/DROLSKY/Time-Local-1.1901/lib/Time/Local.pm" >1.1901 (DROLSKY on 2008-11-02)</option> <option value="/release/DROLSKY/Time-Local-1.35/diff/DROLSKY/Time-Local-1.19/lib/Time/Local.pm" >1.19 (DROLSKY on 2008-11-01)</option> <option value="/release/DROLSKY/Time-Local-1.35/diff/DROLSKY/Time-Local-1.18/lib/Time/Local.pm" >1.18 (DROLSKY on 2007-10-31)</option> <option value="/release/DROLSKY/Time-Local-1.35/diff/DROLSKY/Time-Local-1.17/lib/Time/Local.pm" >1.17 (DROLSKY on 2007-01-25)</option> <option value="/release/DROLSKY/Time-Local-1.35/diff/DROLSKY/Time-Local-1.16/lib/Time/Local.pm" >1.16 (DROLSKY on 2007-01-24)</option> <option value="/release/DROLSKY/Time-Local-1.35/diff/DROLSKY/Time-Local-1.15/lib/Time/Local.pm" >1.15 (DROLSKY on 2007-01-22)</option> <option value="/release/DROLSKY/Time-Local-1.35/diff/DROLSKY/Time-Local-1.14/lib/Time/Local.pm" >1.14 (DROLSKY on 2007-01-21)</option> <option value="/release/DROLSKY/Time-Local-1.35/diff/DROLSKY/Time-Local-1.13/lib/Time/Local.pm" >1.13 (DROLSKY on 2006-08-09)</option> <option value="/release/DROLSKY/Time-Local-1.35/diff/DROLSKY/Time-Local-1.12_01/lib/Time/Local.pm" >1.12_01 DEV (DROLSKY on 2006-03-31)</option> <option value="/release/DROLSKY/Time-Local-1.35/diff/DROLSKY/Time-Local-1.12/lib/Time/Local.pm" >1.12 (DROLSKY on 2005-12-18)</option> <option value="/release/DROLSKY/Time-Local-1.35/diff/DROLSKY/Time-Local-1.11/lib/Time/Local.pm" >1.11 (DROLSKY on 2005-02-09)</option> <option value="/release/DROLSKY/Time-Local-1.35/diff/DROLSKY/Time-Local-1.10/lib/Time/Local.pm" >1.10 (DROLSKY on 2004-04-20)</option> <option value="/release/DROLSKY/Time-Local-1.35/diff/DROLSKY/Time-Local-1.09/lib/Time/Local.pm" >1.09 (DROLSKY on 2004-04-07)</option> <option value="/release/DROLSKY/Time-Local-1.35/diff/DROLSKY/Time-Local-1.08/lib/Time/Local.pm" >1.08 (DROLSKY on 2004-04-07)</option> <option value="/release/DROLSKY/Time-Local-1.35/diff/DROLSKY/Time-Local-1.07_94/lib/Time/Local.pm" >1.07_94 DEV (DROLSKY on 2003-12-11)</option> <option value="/release/DROLSKY/Time-Local-1.35/diff/DROLSKY/Time-Local-1.07_93/lib/Time/Local.pm" >1.07_93 DEV (DROLSKY on 2003-07-24)</option> <option value="/release/DROLSKY/Time-Local-1.35/diff/DROLSKY/Time-Local-1.07_92/lib/Time/Local.pm" >1.07_92 DEV (DROLSKY on 2003-07-23)</option> <option value="/release/DROLSKY/Time-Local-1.35/diff/DROLSKY/Time-Local-1.07_91/lib/Time/Local.pm" >1.07_91 DEV (DROLSKY on 2003-07-22)</option> <option value="/release/DROLSKY/Time-Local-1.35/diff/DROLSKY/Time-Local-1.07_90/lib/Time/Local.pm" >1.07_90 DEV (DROLSKY on 2003-07-15)</option> <option value="/release/DROLSKY/Time-Local-1.35/diff/DROLSKY/Time-Local-1.07/lib/Time/Local.pm" >1.07 (DROLSKY on 2003-06-11)</option> <option value="/release/DROLSKY/Time-Local-1.35/diff/DROLSKY/Time-Local-1.06/lib/Time/Local.pm" >1.06 (DROLSKY on 2003-06-04)</option> <option value="/release/DROLSKY/Time-Local-1.35/diff/DROLSKY/Time-Local-1.05/lib/Time/Local.pm" >1.05 (DROLSKY on 2003-06-03)</option> </optgroup> </select> </li> <li> <ul class="dependencies"> <li class="nav-header">Dependencies</li> <li><a href="/pod/Carp" title="Carp" class="ellipsis">Carp</a></li> <li><a href="/pod/Exporter" title="Exporter" class="ellipsis">Exporter</a></li> <li><a href="/pod/constant" title="constant" class="ellipsis">constant</a></li> <li><a href="/pod/parent" title="parent" class="ellipsis">parent</a></li> <li><a href="/pod/strict" title="strict" class="ellipsis">strict</a></li> <li> <hr> </li> <li> <a href="/module/Time::Local/requires">Reverse dependencies</a> </li> <li> <a href="http://deps.cpantesters.org/?module=Time%3A%3ALocal">CPAN Testers List</a> </li> <li> <a href="https://cpandeps.grinnz.com/?dist=Time-Local">Dependency graph</a> </li> </ul> </li> <li class="nav-header">Permalinks</li> <li> <a href="/release/DROLSKY/Time-Local-1.35/view/lib/Time/Local.pm">This version</a> </li> <li> <a href="/pod/Time::Local">Latest version</a> </li> <li> <div class="plussers"> <div class="nav-header">++ed by:</div> <div> <a class="display-all" href="/author/DAGOLDEN"><img src="https://www.gravatar.com/avatar/bb755c989fcb9897f28a2c6e00df61e2?d=identicon&s=20" title="DAGOLDEN" alt="DAGOLDEN"></a> <a class="display-all" href="/author/PAVELSR"><img src="https://www.gravatar.com/avatar/bdd3233525e2a6ca61bbc05752111c15?d=identicon&s=20" title="PAVELSR" alt="PAVELSR"></a> <a class="display-all" href="/author/PINGAN"><img src="https://www.gravatar.com/avatar/a02222e5e0e4fd24d52fc29a08ac6bcb?d=identicon&s=20" title="PINGAN" alt="PINGAN"></a> <a class="display-all" href="/author/RRWO"><img src="https://www.gravatar.com/avatar/4a5274bc5d690ee3d619f044778771a7?d=identicon&s=20" title="RRWO" alt="RRWO"></a> <a class="display-all" href="/author/KUERBIS"><img src="https://www.gravatar.com/avatar/136c77354b6a6d4451c38198dd74d83c?d=identicon&s=20" title="KUERBIS" alt="KUERBIS"></a> </div> <!-- Display counts of plussers--> <div> <a href="/dist/Time-Local/plussers">6 PAUSE users</a> </div> <div> 3 non-PAUSE users </div> </div> </li> <li> <div> <button class="contributors-show-button btn-link">and 5 contributors</button> <div id="metacpan_contributors" class="slide-out slide-out-hidden"> <div> <ul> <li class="contributor" data-contrib-email="rafl@debian.org" > <img class="gravatar" width="20" height="20" src="https://www.gravatar.com/avatar/d41d8cd98f00b204e9800998ecf8427e?d=identicon&s=20" /> Florian Ragwitz </li> <li class="contributor" data-cpan-author="OSCHWALD" data-contrib-email="oschwald@gmail.com" > <a href="/author/OSCHWALD" class="cpan-author"> <img class="gravatar" width="20" height="20" src="https://www.gravatar.com/avatar/2c092000b26ce71a7beb2161da998468?d=identicon&s=20" /> Gregory Oschwald </a> </li> <li class="contributor" data-contrib-email="nick@cpanel.net" > <img class="gravatar" width="20" height="20" src="https://www.gravatar.com/avatar/d41d8cd98f00b204e9800998ecf8427e?d=identicon&s=20" /> J. Nick Koston </li> <li class="contributor" data-cpan-author="WYANT" data-contrib-email="wyant@cpan.org" > <a href="/author/WYANT" class="cpan-author"> <img class="gravatar" width="20" height="20" src="https://www.gravatar.com/avatar/6930f8f8cf37e65ea95078667ded31c4?d=identicon&s=20" /> Tom Wyant </a> </li> <li class="contributor" data-contrib-email="unknown@example.com" > <img class="gravatar" width="20" height="20" src="https://www.gravatar.com/avatar/d41d8cd98f00b204e9800998ecf8427e?d=identicon&s=20" /> Unknown </li> </ul> </div> </div> </div> </li> </ul> </div> </nav> <div class="content-navigation"> <div class="breadcrumbs"> <span> <a data-keyboard-shortcut="g a" rel="author" href="/author/DROLSKY" class="author-name">Dave Rolsky</a> </span> <span> / </span> <div class="release dist-release status-latest maturity-released"> <span class="dropdown"><b class="caret"></b></span> <select class="select-navigator "> <option selected value="/release/DROLSKY/Time-Local-1.35/view/lib/Time/Local.pm" >1.35 (DROLSKY on 2023-04-29)</option> <option value="/release/DROLSKY/Time-Local-1.34-TRIAL/view/lib/Time/Local.pm" >1.34-TRIAL DEV (DROLSKY on 2023-03-25)</option> <option value="/release/DROLSKY/Time-Local-1.33-TRIAL/view/lib/Time/Local.pm" >1.33-TRIAL DEV (DROLSKY on 2023-02-12)</option> <option value="/release/DROLSKY/Time-Local-1.32-TRIAL/view/lib/Time/Local.pm" >1.32-TRIAL DEV (DROLSKY on 2023-02-12)</option> <option value="/release/DROLSKY/Time-Local-1.31-TRIAL/view/lib/Time/Local.pm" >1.31-TRIAL DEV (DROLSKY on 2021-11-09)</option> <option value="/release/DROLSKY/Time-Local-1.30/view/lib/Time/Local.pm" >1.30 (DROLSKY on 2020-01-27)</option> <option value="/release/DROLSKY/Time-Local-1.29-TRIAL/view/lib/Time/Local.pm" >1.29-TRIAL DEV (DROLSKY on 2020-01-19)</option> <option value="/release/DROLSKY/Time-Local-1.28/view/lib/Time/Local.pm" >1.28 (DROLSKY on 2018-06-13)</option> <option value="/release/DROLSKY/Time-Local-1.27/view/lib/Time/Local.pm" >1.27 (DROLSKY on 2018-06-09)</option> <option value="/release/DROLSKY/Time-Local-1.26-TRIAL/view/lib/Time/Local.pm" >1.26-TRIAL DEV (DROLSKY on 2018-05-21)</option> <option value="/release/DROLSKY/Time-Local-1.25/view/lib/Time/Local.pm" >1.25 (DROLSKY on 2016-11-17)</option> <option value="/release/DROLSKY/Time-Local-1.24/view/lib/Time/Local.pm" >1.24 (DROLSKY on 2016-08-14)</option> <option value="/release/FLORA/Time-Local-1.2000/view/lib/Time/Local.pm" >1.2000 (FLORA on 2011-01-02)</option> <option value="/release/FLORA/Time-Local-1.1902-TRIAL/view/lib/Time/Local.pm" >1.1902-TRIAL DEV (FLORA on 2010-12-16)</option> <optgroup label="BackPAN">' <option value="/release/DROLSKY/Time-Local-1.2300/view/lib/Time/Local.pm" >1.2300 (DROLSKY on 2012-07-20)</option> <option value="/release/DROLSKY/Time-Local-1.2200/view/lib/Time/Local.pm" >1.2200 (DROLSKY on 2012-07-09)</option> <option value="/release/DROLSKY/Time-Local-1.2100/view/lib/Time/Local.pm" >1.2100 (DROLSKY on 2012-07-09)</option> <option value="/release/DROLSKY/Time-Local-1.1901/view/lib/Time/Local.pm" >1.1901 (DROLSKY on 2008-11-02)</option> <option value="/release/DROLSKY/Time-Local-1.19/view/lib/Time/Local.pm" >1.19 (DROLSKY on 2008-11-01)</option> <option value="/release/DROLSKY/Time-Local-1.18/view/lib/Time/Local.pm" >1.18 (DROLSKY on 2007-10-31)</option> <option value="/release/DROLSKY/Time-Local-1.17/view/lib/Time/Local.pm" >1.17 (DROLSKY on 2007-01-25)</option> <option value="/release/DROLSKY/Time-Local-1.16/view/lib/Time/Local.pm" >1.16 (DROLSKY on 2007-01-24)</option> <option value="/release/DROLSKY/Time-Local-1.15/view/lib/Time/Local.pm" >1.15 (DROLSKY on 2007-01-22)</option> <option value="/release/DROLSKY/Time-Local-1.14/view/lib/Time/Local.pm" >1.14 (DROLSKY on 2007-01-21)</option> <option value="/release/DROLSKY/Time-Local-1.13/view/lib/Time/Local.pm" >1.13 (DROLSKY on 2006-08-09)</option> <option value="/release/DROLSKY/Time-Local-1.12_01/view/lib/Time/Local.pm" >1.12_01 DEV (DROLSKY on 2006-03-31)</option> <option value="/release/DROLSKY/Time-Local-1.12/view/lib/Time/Local.pm" >1.12 (DROLSKY on 2005-12-18)</option> <option value="/release/DROLSKY/Time-Local-1.11/view/lib/Time/Local.pm" >1.11 (DROLSKY on 2005-02-09)</option> <option value="/release/DROLSKY/Time-Local-1.10/view/lib/Time/Local.pm" >1.10 (DROLSKY on 2004-04-20)</option> <option value="/release/DROLSKY/Time-Local-1.09/view/lib/Time/Local.pm" >1.09 (DROLSKY on 2004-04-07)</option> <option value="/release/DROLSKY/Time-Local-1.08/view/lib/Time/Local.pm" >1.08 (DROLSKY on 2004-04-07)</option> <option value="/release/DROLSKY/Time-Local-1.07_94/view/lib/Time/Local.pm" >1.07_94 DEV (DROLSKY on 2003-12-11)</option> <option value="/release/DROLSKY/Time-Local-1.07_93/view/lib/Time/Local.pm" >1.07_93 DEV (DROLSKY on 2003-07-24)</option> <option value="/release/DROLSKY/Time-Local-1.07_92/view/lib/Time/Local.pm" >1.07_92 DEV (DROLSKY on 2003-07-23)</option> <option value="/release/DROLSKY/Time-Local-1.07_91/view/lib/Time/Local.pm" >1.07_91 DEV (DROLSKY on 2003-07-22)</option> <option value="/release/DROLSKY/Time-Local-1.07_90/view/lib/Time/Local.pm" >1.07_90 DEV (DROLSKY on 2003-07-15)</option> <option value="/release/DROLSKY/Time-Local-1.07/view/lib/Time/Local.pm" >1.07 (DROLSKY on 2003-06-11)</option> <option value="/release/DROLSKY/Time-Local-1.06/view/lib/Time/Local.pm" >1.06 (DROLSKY on 2003-06-04)</option> <option value="/release/DROLSKY/Time-Local-1.05/view/lib/Time/Local.pm" >1.05 (DROLSKY on 2003-06-03)</option> </optgroup> </select> <a data-keyboard-shortcut="g d" class="release-name" href="/dist/Time-Local">Time-Local-1.35</a> </div> <span class="river-gauge-gauge"> <svg width="24px" height="15px" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink"> <g> <title> River stage five • 215 direct dependents • 12722 total dependents </title> <rect x="0" y="0" width="4" height="15" fill="#7ea3f2" /> <rect x="5" y="0" width="4" height="15" fill="#7ea3f2" /> <rect x="10" y="0" width="4" height="15" fill="#7ea3f2" /> <rect x="15" y="0" width="4" height="15" fill="#7ea3f2" /> <rect x="20" y="0" width="4" height="15" fill="#7ea3f2" /> </g> </svg> </span> <div id="Time-Local-fav" class="show-logged-in"> <form action="/account/favorite/add" style="display: inline" method="POST"> <input type="hidden" name="remove" value="0"> <input type="hidden" name="release" value="Time-Local-1.35"> <input type="hidden" name="author" value="DROLSKY"> <input type="hidden" name="distribution" value="Time-Local"> <button type="submit" class="favorite highlight"><span>9</span> ++</button> </form> </div> <div class="show-logged-out"> <button class="fav-not-logged-in favorite highlight"><span>9</span> ++</button> </div> / <span>Time::Local</span> </div> </div> <main class="content"> <nav class="toc"> <div class="toc-header"><strong>Contents</strong></div> <ul> <li><a href="#NAME">NAME</a></li> <li><a href="#VERSION">VERSION</a></li> <li><a href="#SYNOPSIS">SYNOPSIS</a></li> <li><a href="#DESCRIPTION">DESCRIPTION</a></li> <li><a href="#FUNCTIONS">FUNCTIONS</a> <ul> <li><a href="#timelocal_posix()-and-timegm_posix()">timelocal_posix() and timegm_posix()</a></li> <li><a href="#timelocal_modern()-and-timegm_modern()">timelocal_modern() and timegm_modern()</a></li> <li><a href="#timelocal()-and-timegm()">timelocal() and timegm()</a></li> <li><a href="#timelocal_nocheck()-and-timegm_nocheck()">timelocal_nocheck() and timegm_nocheck()</a></li> <li><a href="#Year-Value-Interpretation">Year Value Interpretation</a></li> <li><a href="#Limits-of-time_t">Limits of time_t</a></li> <li><a href="#Ambiguous-Local-Times-(DST)">Ambiguous Local Times (DST)</a></li> <li><a href="#Non-Existent-Local-Times-(DST)">Non-Existent Local Times (DST)</a></li> <li><a href="#Negative-Epoch-Values">Negative Epoch Values</a></li> </ul> </li> <li><a href="#IMPLEMENTATION">IMPLEMENTATION</a></li> <li><a href="#AUTHORS-EMERITUS">AUTHORS EMERITUS</a></li> <li><a href="#BUGS">BUGS</a></li> <li><a href="#SOURCE">SOURCE</a></li> <li><a href="#AUTHOR">AUTHOR</a></li> <li><a href="#CONTRIBUTORS">CONTRIBUTORS</a></li> <li><a href="#COPYRIGHT-AND-LICENSE">COPYRIGHT AND LICENSE</a></li> </ul></nav> <div class="pod anchors"> <h1 id="NAME">NAME</h1> <p>Time::Local - Efficiently compute time from local and GMT time</p> <h1 id="VERSION">VERSION</h1> <p>version 1.35</p> <h1 id="SYNOPSIS">SYNOPSIS</h1> <pre><code>use Time::Local qw( timelocal_posix timegm_posix ); my $time = timelocal_posix( $sec, $min, $hour, $mday, $mon, $year ); my $time = timegm_posix( $sec, $min, $hour, $mday, $mon, $year );</code></pre> <h1 id="DESCRIPTION">DESCRIPTION</h1> <p>This module provides functions that are the inverse of built-in perl functions <code>localtime()</code> and <code>gmtime()</code>. They accept a date as a six-element array, and return the corresponding <code>time(2)</code> value in seconds since the system epoch (Midnight, January 1, 1970 GMT on Unix, for example). This value can be positive or negative, though POSIX only requires support for positive values, so dates before the system's epoch may not work on all operating systems.</p> <p>It is worth drawing particular attention to the expected ranges for the values provided. The value for the day of the month is the actual day (i.e. 1..31), while the month is the number of months since January (0..11). This is consistent with the values returned from <code>localtime()</code> and <code>gmtime()</code>.</p> <h1 id="FUNCTIONS">FUNCTIONS</h1> <h2 id="timelocal_posix()-and-timegm_posix()"><a id="timelocal_posix"></a><a id="timelocal_posix-and-timegm_posix"></a><code>timelocal_posix()</code> and <code>timegm_posix()</code></h2> <p><i>Since version 1.30.</i></p> <p>These functions are the exact inverse of Perl's built-in <code>localtime</code> and <code>gmtime</code> functions. That means that calling <code>timelocal_posix( localtime($value) )</code> will always give you the same <code>$value</code> you started with. The same applies to <code>timegm_posix( gmtime($value) )</code>.</p> <p>The one exception is when the value returned from <code>localtime()</code> represents an ambiguous local time because of a DST change. See the documentation below for more details.</p> <p>These functions expect the year value to be the number of years since 1900, which is what the <code>localtime()</code> and <code>gmtime()</code> built-ins returns.</p> <p>They perform range checking by default on the input <code>$sec</code>, <code>$min</code>, <code>$hour</code>, <code>$mday</code>, and <code>$mon</code> values and will croak (using <code>Carp::croak()</code>) if given a value outside the allowed ranges.</p> <p>While it would be nice to make this the default behavior, that would almost certainly break a lot of code, so you must explicitly import these functions and use them instead of the default <code>timelocal()</code> and <code>timegm()</code>.</p> <p>You are <b>strongly</b> encouraged to use these functions in any new code which uses this module. It will almost certainly make your code's behavior less surprising.</p> <h2 id="timelocal_modern()-and-timegm_modern()"><a id="timelocal_modern"></a><a id="timelocal_modern-and-timegm_modern"></a><code>timelocal_modern()</code> and <code>timegm_modern()</code></h2> <p><i>Since version 1.27.</i></p> <p>When <code>Time::Local</code> was first written, it was a common practice to represent years as a two-digit value like <code>99</code> for <code>1999</code> or <code>1</code> for <code>2001</code>. This caused all sorts of problems (google "Y2K problem" if you're very young) and developers eventually realized that this was a terrible idea.</p> <p>The default exports of <code>timelocal()</code> and <code>timegm()</code> do a complicated calculation when given a year value less than 1000. This leads to surprising results in many cases. See <a href="#Year-Value-Interpretation">"Year Value Interpretation"</a> for details.</p> <p>The <code>time*_modern()</code> functions do not do this year munging and simply take the year value as provided.</p> <p>They perform range checking by default on the input <code>$sec</code>, <code>$min</code>, <code>$hour</code>, <code>$mday</code>, and <code>$mon</code> values and will croak (using <code>Carp::croak()</code>) if given a value outside the allowed ranges.</p> <h2 id="timelocal()-and-timegm()"><a id="timelocal"></a><a id="timelocal-and-timegm"></a><code>timelocal()</code> and <code>timegm()</code></h2> <p>This module exports two functions by default, <code>timelocal()</code> and <code>timegm()</code>.</p> <p>They perform range checking by default on the input <code>$sec</code>, <code>$min</code>, <code>$hour</code>, <code>$mday</code>, and <code>$mon</code> values and will croak (using <code>Carp::croak()</code>) if given a value outside the allowed ranges.</p> <p><b>Warning: The year value interpretation that these functions and their nocheck variants use will almost certainly lead to bugs in your code, if not now, then in the future. You are strongly discouraged from using these in new code, and you should convert old code to using either the <code>*_posix</code> or <code>*_modern</code> functions if possible.</b></p> <h2 id="timelocal_nocheck()-and-timegm_nocheck()"><a id="timelocal_nocheck"></a><a id="timelocal_nocheck-and-timegm_nocheck"></a><code>timelocal_nocheck()</code> and <code>timegm_nocheck()</code></h2> <p>If you are working with data you know to be valid, you can use the "nocheck" variants, <code>timelocal_nocheck()</code> and <code>timegm_nocheck()</code>. These variants must be explicitly imported.</p> <p>If you supply data which is not valid (month 27, second 1,000) the results will be unpredictable (so don't do that).</p> <p>Note that my benchmarks show that this is just a 3% speed increase over the checked versions, so unless calling <code>Time::Local</code> is the hottest spot in your application, using these nocheck variants is unlikely to have much impact on your application.</p> <h2 id="Year-Value-Interpretation"><a id="Year"></a>Year Value Interpretation</h2> <p><b>This does not apply to the <code>*_posix</code> or <code>*_modern</code> functions. Use those exports if you want to ensure consistent behavior as your code ages.</b></p> <p>Strictly speaking, the year should be specified in a form consistent with <code>localtime()</code>, i.e. the offset from 1900. In order to make the interpretation of the year easier for humans, however, who are more accustomed to seeing years as two-digit or four-digit values, the following conventions are followed:</p> <ul> <li><p>Years greater than 999 are interpreted as being the actual year, rather than the offset from 1900. Thus, 1964 would indicate the year Martin Luther King won the Nobel prize, not the year 3864.</p> </li> <li><p>Years in the range 100..999 are interpreted as offset from 1900, so that 112 indicates 2012. This rule also applies to years less than zero (but see note below regarding date range).</p> </li> <li><p>Years in the range 0..99 are interpreted as shorthand for years in the rolling "current century," defined as 50 years on either side of the current year. Thus, today, in 1999, 0 would refer to 2000, and 45 to 2045, but 55 would refer to 1955. Twenty years from now, 55 would instead refer to 2055. This is messy, but matches the way people currently think about two digit dates. Whenever possible, use an absolute four digit year instead.</p> </li> </ul> <p>The scheme above allows interpretation of a wide range of dates, particularly if 4-digit years are used. But it also means that the behavior of your code changes as time passes, because the rolling "current century" changes each year.</p> <h2 id="Limits-of-time_t"><a id="Limits"></a>Limits of time_t</h2> <p>On perl versions older than 5.12.0, the range of dates that can be actually be handled depends on the size of <code>time_t</code> (usually a signed integer) on the given platform. Currently, this is 32 bits for most systems, yielding an approximate range from Dec 1901 to Jan 2038.</p> <p>Both <code>timelocal()</code> and <code>timegm()</code> croak if given dates outside the supported range.</p> <p>As of version 5.12.0, perl has stopped using the time implementation of the operating system it's running on. Instead, it has its own implementation of those routines with a safe range of at least +/- 2**52 (about 142 million years)</p> <h2 id="Ambiguous-Local-Times-(DST)"><a id="Ambiguous"></a><a id="Ambiguous-Local-Times-DST"></a>Ambiguous Local Times (DST)</h2> <p>Because of DST changes, there are many time zones where the same local time occurs for two different GMT times on the same day. For example, in the "Europe/Paris" time zone, the local time of 2001-10-28 02:30:00 can represent either 2001-10-28 00:30:00 GMT, <b>or</b> 2001-10-28 01:30:00 GMT.</p> <p>When given an ambiguous local time, the timelocal() function will always return the epoch for the <i>earlier</i> of the two possible GMT times.</p> <h2 id="Non-Existent-Local-Times-(DST)"><a id="Non"></a><a id="Non-Existent-Local-Times-DST"></a>Non-Existent Local Times (DST)</h2> <p>When a DST change causes a locale clock to skip one hour forward, there will be an hour's worth of local times that don't exist. Again, for the "Europe/Paris" time zone, the local clock jumped from 2001-03-25 01:59:59 to 2001-03-25 03:00:00.</p> <p>If the <code>timelocal()</code> function is given a non-existent local time, it will simply return an epoch value for the time one hour later.</p> <h2 id="Negative-Epoch-Values"><a id="Negative"></a>Negative Epoch Values</h2> <p>On perl version 5.12.0 and newer, negative epoch values are fully supported.</p> <p>On older versions of perl, negative epoch (<code>time_t</code>) values, which are not officially supported by the POSIX standards, are known not to work on some systems. These include MacOS (pre-OSX) and Win32.</p> <p>On systems which do support negative epoch values, this module should be able to cope with dates before the start of the epoch, down the minimum value of time_t for the system.</p> <h1 id="IMPLEMENTATION">IMPLEMENTATION</h1> <p>These routines are quite efficient and yet are always guaranteed to agree with <code>localtime()</code> and <code>gmtime()</code>. We manage this by caching the start times of any months we've seen before. If we know the start time of the month, we can always calculate any time within the month. The start times are calculated using a mathematical formula. Unlike other algorithms that do multiple calls to <code>gmtime()</code>.</p> <p>The <code>timelocal()</code> function is implemented using the same cache. We just assume that we're translating a GMT time, and then fudge it when we're done for the timezone and daylight savings arguments. Note that the timezone is evaluated for each date because countries occasionally change their official timezones. Assuming that <code>localtime()</code> corrects for these changes, this routine will also be correct.</p> <h1 id="AUTHORS-EMERITUS"><a id="AUTHORS"></a>AUTHORS EMERITUS</h1> <p>This module is based on a Perl 4 library, timelocal.pl, that was included with Perl 4.036, and was most likely written by Tom Christiansen.</p> <p>The current version was written by Graham Barr.</p> <h1 id="BUGS">BUGS</h1> <p>The whole scheme for interpreting two-digit years can be considered a bug.</p> <p>Bugs may be submitted at <a href="https://github.com/houseabsolute/Time-Local/issues">https://github.com/houseabsolute/Time-Local/issues</a>.</p> <p>There is a mailing list available for users of this distribution, <a href="mailto:datetime@perl.org">mailto:datetime@perl.org</a>.</p> <h1 id="SOURCE">SOURCE</h1> <p>The source code repository for Time-Local can be found at <a href="https://github.com/houseabsolute/Time-Local">https://github.com/houseabsolute/Time-Local</a>.</p> <h1 id="AUTHOR">AUTHOR</h1> <p>Dave Rolsky <autarch@urth.org></p> <h1 id="CONTRIBUTORS">CONTRIBUTORS</h1> <ul> <li><p>Florian Ragwitz <rafl@debian.org></p> </li> <li><p>Gregory Oschwald <oschwald@gmail.com></p> </li> <li><p>J. Nick Koston <nick@cpanel.net></p> </li> <li><p>Tom Wyant <wyant@cpan.org></p> </li> <li><p>Unknown <unknown@example.com></p> </li> </ul> <h1 id="COPYRIGHT-AND-LICENSE"><a id="COPYRIGHT"></a>COPYRIGHT AND LICENSE</h1> <p>This software is copyright (c) 1997 - 2023 by Graham Barr & Dave Rolsky.</p> <p>This is free software; you can redistribute it and/or modify it under the same terms as the Perl 5 programming language system itself.</p> <p>The full text of the license can be found in the <i>LICENSE</i> file included with this distribution.</p></div> <div id="metacpan_install-instructions-dialog" class="modal fade"> <div class="modal-dialog"> <div class="modal-content"> <div class="modal-header"> <button type="button" class="close" data-dismiss="modal" aria-hidden="true">×</button> <h4 class="modal-title">Module Install Instructions</h4> </div> <div class="modal-body"> <p>To install Time::Local, copy and paste the appropriate command in to your terminal.</p> <p><a href="/dist/App-cpanminus/view/bin/cpanm">cpanm</a></p> <pre><code>cpanm Time::Local</code></pre> <p><a href="/pod/CPAN">CPAN shell</a></p> <pre><code>perl -MCPAN -e shell install Time::Local</code></pre> <p>For more information on module installation, please visit <a href="https://www.cpan.org/modules/INSTALL.html">the detailed CPAN module installation guide</a>.</p> </div> <div class="modal-footer"> <a href="#" data-dismiss="modal" class="btn">Close</a> </div> </div> </div> </div> </main> <div class="content-pagination"> </div> </div> <footer class="footer"> <div class="footer-container"> <div class="footer-social"> <div class="footer-link footer-logo"> <a href="/"> <img src="/static/images/metacpan-logo.svg" alt="MetaCPAN" /> </a> </div> <a class="footer-social-link" href="https://github.com/metacpan"> <i class="fab fa-github-square"></i> </a> <a class="footer-social-link" href="https://fosstodon.org/@metacpan"> <i class="fab fa-mastodon"></i> </a> </div> <div class="footer-links"> <div class="footer-link"> <a href="/about">About</a> </div> <div class="footer-link"> <a href="/about/sponsors">Sponsor</a> </div> <div class="footer-link"> <a href="https://grep.metacpan.org">grep::cpan</a> </div> <div class="footer-link"> <a href="/recent">Recent</a> </div> <div class="footer-link"> <a href="/about/faq">FAQ</a> </div> <div class="footer-link"> <a href="/tools">Tools</a> </div> <div class="footer-link"> <a href="https://fastapi.metacpan.org/">API</a> </div> <div class="footer-link"> <a href="https://www.perl.org/">Perl.org</a> </div> </div> <div class="footer-sponsors"> <a class="footer-sponsor-link" target="_blank" href="https://www.bytemark.co.uk/" rel="noopener"> <img class="footer-sponsor-bytemark" src="/static/images/sponsors/bytemark_logo.svg" alt="Bytemark logo"> </a> <a class="footer-sponsor-link" target="_blank" href="https://www.liquidweb.com/" rel="noopener"> <img class="footer-sponsor-liquidweb" src="/static/images/sponsors/liquidweb_logo.png" alt="liquidweb logo"> </a> <a class="footer-sponsor-link" target="_blank" href="https://deriv.com/careers/" rel="noopener"> <img class="footer-sponsor-deriv" src="/static/images/sponsors/deriv.svg" alt="Deriv logo"> </a> <a class="footer-sponsor-link" target="_blank" href="https://geocode.xyz" rel="noopener"> <img class="footer-sponsor-geocode" src="/static/images/sponsors/geocodelogo.svg" alt="Geocode logo"> </a> <a class="footer-sponsor-link" target="_blank" href="https://www.fastly.com/" rel="noopener"> <img class="footer-sponsor-fastly" src="/static/images/sponsors/fastly_logo.svg" alt="Fastly logo"> </a> <a class="footer-sponsor-link" target="_blank" href="https://opencagedata.com" rel="noopener"> <img class="footer-sponsor-opencage" src="/static/images/sponsors/open-cage.svg" alt="OpenCage logo"> </a> <!-- Added 2024-07-22 --> <a class="footer-sponsor-link" target="_blank" href="https://www.elastic.co/" rel="noopener"> <img class="footer-sponsor-elastic" src="/static/images/sponsors/elastic.svg" alt="Elastic logo"> </a> <!-- Added 2024-07-22 --> <a class="footer-sponsor-link" target="_blank" href="https://route4me.com/" rel="noopener"> <img class="footer-sponsor-route4me" src="/static/images/sponsors/route4me.png" alt="Route4Me logo"> </a> </div> </div> </footer> <div class="modal fade" tabindex="-1" role="dialog" id="metacpan_keyboard-shortcuts"> <div class="modal-dialog"> <div class="modal-content"> <div class="modal-header"> <button type="button" class="close" data-dismiss="modal">×</button> <h4 class="modal-title">Keyboard Shortcuts</h4> </div> <div class="modal-body row"> <div class="col-md-6"> <table class="table keyboard-shortcuts"> <thead> <tr> <th></th> <th>Global</th> </tr> </thead> <tbody> <tr> <td class="keys"> <kbd>s</kbd> </td> <td>Focus search bar</td> </tr> <tr> <td class="keys"> <kbd>?</kbd> </td> <td>Bring up this help dialog</td> </tr> </tbody> </table> <table class="table keyboard-shortcuts"> <thead> <tr> <th></th> <th>GitHub</th> </tr> </thead> <tbody> <tr> <td class="keys"> <kbd>g</kbd> <kbd>p</kbd> </td> <td>Go to pull requests</td> </tr> <tr> <td class="keys"> <kbd>g</kbd> <kbd>i</kbd> </td> <td>go to github issues (only if github is preferred repository)</td> </tr> </tbody> </table> </div> <div class="col-md-6"> <table class="table keyboard-shortcuts"> <thead> <tr> <th></th> <th>POD</th> </tr> </thead> <tbody> <tr> <td class="keys"> <kbd>g</kbd> <kbd>a</kbd> </td> <td>Go to author</td> </tr> <tr> <td class="keys"> <kbd>g</kbd> <kbd>c</kbd> </td> <td>Go to changes</td> </tr> <tr> <td class="keys"> <kbd>g</kbd> <kbd>i</kbd> </td> <td>Go to issues</td> </tr> <tr> <td class="keys"> <kbd>g</kbd> <kbd>d</kbd> </td> <td>Go to dist</td> </tr> <tr> <td class="keys"> <kbd>g</kbd> <kbd>r</kbd> </td> <td>Go to repository/SCM</td> </tr> <tr> <td class="keys"> <kbd>g</kbd> <kbd>s</kbd> </td> <td>Go to source</td> </tr> <tr> <td class="keys"> <kbd>g</kbd> <kbd>b</kbd> </td> <td>Go to file browse</td> </tr> </tbody> </table> </div> <div class="col-md-12"> <table class="table keyboard-shortcuts"> <thead> <tr> <th></th> <th>Search terms</th> </tr> </thead> <tbody> <tr> <td><em>module:</em> (e.g. <a href="/search?q=module%3APlugin">module:Plugin</a>)</td> </tr> <tr> <td><em>distribution:</em> (e.g. <a href="/search?q=distribution%3ADancer+auth">distribution:Dancer auth</a>)</td> </tr> <tr> <td><em>author:</em> (e.g. <a href="/search?q=author%3ASONGMU+Redis">author:SONGMU Redis</a>)</td> </tr> <tr> <td><em>version:</em> (e.g. <a href="/search?q=version%3A1.00">version:1.00</a>)</td> </tr> </tbody> </table> </div> </div> <div class="modal-footer"></div> </div> </div> </div> </body> </html>