Time::Local man page on BSDOS

Man page or keyword search:  
man Server   6284 pages
apropos Keyword Search (all sections)
Output format
BSDOS logo
[printable version]



Time::Local(3)	 Perl Programmers Reference Guide  Time::Local(3)

NAME
       Time::Local - efficiently compute time from local and GMT
       time

SYNOPSIS
	   $time = timelocal($sec,$min,$hours,$mday,$mon,$year);
	   $time = timegm($sec,$min,$hours,$mday,$mon,$year);

DESCRIPTION
       These routines are quite efficient and yet are always
       guaranteed to agree with localtime() and gmtime(), the
       most notable points being that year is year-1900 and month
       is 0..11.  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 themselves are guessed by
       successive approximation starting at the current time,
       since most dates seen in practice are close to the current
       date.  Unlike algorithms that do a binary search (calling
       gmtime once for each bit of the time value, resulting in
       32 calls), this algorithm calls it at most 6 times, and
       usually only once or twice.  If you hit the month cache,
       of course, it doesn't call it at all.

       timelocal 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.  The timezone is determined by examining the
       result of localtime(0) when the package is initialized.
       The daylight savings offset is currently assumed to be one
       hour.

       Both routines return -1 if the integer limit is hit. I.e.
       for dates after the 1st of January, 2038 on most machines.

16/Sep/1999	       perl 5.005, patch 03			1

[top]
                             _         _         _ 
                            | |       | |       | |     
                            | |       | |       | |     
                         __ | | __ __ | | __ __ | | __  
                         \ \| |/ / \ \| |/ / \ \| |/ /  
                          \ \ / /   \ \ / /   \ \ / /   
                           \   /     \   /     \   /    
                            \_/       \_/       \_/ 
More information is available in HTML format for server BSDOS

List of man pages available for BSDOS

Copyright (c) for man pages and the logo by the respective OS vendor.

For those who want to learn more, the polarhome community provides shell access and support.

[legal] [privacy] [GNU] [policy] [cookies] [netiquette] [sponsors] [FAQ]
Tweet
Polarhome, production since 1999.
Member of Polarhome portal.
Based on Fawad Halim's script.
....................................................................
Vote for polarhome
Free Shell Accounts :: the biggest list on the net