summaryrefslogtreecommitdiff
path: root/regress/base/date2unixtime.pl
blob: bfb49c8e56203710b3d3e3106e487b33fcd12f46 (plain)
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
#!/usr/bin/env perl
#
# $FML: date2unixtime.pl,v 1.1 2001/07/08 14:02:02 fukachan Exp $
#

use Mail::Message::Date;

require 'ctime.pl';

my $t    = time;
my $date = ctime( $t );

chop $date;

my $tx = Mail::Message::Date::date_to_unixtime( $date ), "\t";

print "* date -> unixtime: $t => $date => $tx\n";

if ($t == $tx) {
   print "ok\n";
}
else {
   print "fail\n";
}

exit 0;