blob: 19cf9f678c5d1976815150e1eca182f98d88829d (
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
27
28
29
30
31
32
33
34
35
36
|
#!/usr/bin/env perl
#
# Copyright (C) 2002,2006 Ken'ichi Fukamachi
# All rights reserved. This program is free software; you can
# redistribute it and/or modify it under the same terms as Perl itself.
#
# $FML: date2unixtime.pl,v 1.5 2006/01/24 11:33:04 fukachan Exp $
#
use strict;
use Mail::Message::Date;
my $debug = defined $ENV{'debug'} ? 1 : 0;
# require 'ctime.pl';
use Time::localtime;
my $t = time;
my $date = ctime( $t );
$date =~ s/[\s\n]*$//;
my $dp = new Mail::Message::Date;
my $tx = $dp->date_to_unixtime( $date );
use FML::Test::Utils;
my $tool = new FML::Test::Utils;
$tool->set_title("Mail::Message::Date");
if ($debug) {
print STDERR "Mail::Message::Date ";
print STDERR "(date -> unixtime): $t => $date => $tx\n";
}
$tool->diff($t, $tx);
exit 0;
|