summaryrefslogtreecommitdiffstats
path: root/contrib/perl5/lib/Time/Local.pm
diff options
context:
space:
mode:
authormarkm <markm@FreeBSD.org>1999-05-02 14:33:17 +0000
committermarkm <markm@FreeBSD.org>1999-05-02 14:33:17 +0000
commit77644ee620b6a79cf8c538abaf7cd301a875528d (patch)
treeb4adabf341898a4378f4b7f8c7fb65f3f7c77769 /contrib/perl5/lib/Time/Local.pm
parent4fcbc3669aa997848e15198cc9fb856287a6788c (diff)
downloadFreeBSD-src-77644ee620b6a79cf8c538abaf7cd301a875528d.zip
FreeBSD-src-77644ee620b6a79cf8c538abaf7cd301a875528d.tar.gz
Maintenance releace 3 of perl5.005. Includes support for threads.
Diffstat (limited to 'contrib/perl5/lib/Time/Local.pm')
-rw-r--r--contrib/perl5/lib/Time/Local.pm22
1 files changed, 12 insertions, 10 deletions
diff --git a/contrib/perl5/lib/Time/Local.pm b/contrib/perl5/lib/Time/Local.pm
index eef412d..b2fba7c 100644
--- a/contrib/perl5/lib/Time/Local.pm
+++ b/contrib/perl5/lib/Time/Local.pm
@@ -17,16 +17,18 @@ Time::Local - efficiently compute time from local and GMT time
=head1 DESCRIPTION
-These routines are quite efficient and yet are always guaranteed to agree
-with localtime() and gmtime(). 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.
+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
OpenPOWER on IntegriCloud