File: Everywhere.pm

package info (click to toggle)
libtime-y2038-perl 20100403-3
  • links: PTS, VCS
  • area: main
  • in suites: jessie, jessie-kfreebsd
  • size: 168 kB
  • ctags: 104
  • sloc: ansic: 811; perl: 497; makefile: 2
file content (43 lines) | stat: -rw-r--r-- 777 bytes parent folder | download | duplicates (5)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
package Time::y2038::Everywhere;

use strict;
use warnings;

our $VERSION = '20100403';

use Time::y2038;

*CORE::GLOBAL::localtime = \&localtime;
*CORE::GLOBAL::gmtime    = \&gmtime;

1;

__END__

=head1 NAME

Time::y2038::Everywhere - Use Time::y2038's gmtime and localtime everywhere.

=head1 SYNOPSIS

    use Time::y2038::Everywhere;

    # All uses of localtime() and gmtime() in the whole program
    # are now using Time::y2038's

=head1 DESCRIPTION

Time::y2038::Everywhere replaces localtime() and gmtime() with its own
functions everywhere.  This ensures not just that your code is 2038
safe, but that any modules you use are, too.

=head1 NOTES

May also override Time::Local::timelocal and Time::Local::timegm in
the future.

=head1 SEE ALSO

L<Time::y2038>

=cut