| 1 |
#!/usr/bin/perl |
| 2 |
|
| 3 |
use warnings; |
| 4 |
use strict; |
| 5 |
use Test::Inter; |
| 6 |
$::ti = new Test::Inter $0; |
| 7 |
require "tests-dm5.pl"; |
| 8 |
|
| 9 |
Date_Init("TZ=EST"); |
| 10 |
|
| 11 |
my $tests =" |
| 12 |
|
| 13 |
today +0000 +0100 2 => '' |
| 14 |
|
| 15 |
2001082812:05:00 +0000 BST => 2001082813:05:00 |
| 16 |
|
| 17 |
2001012812:05:00 GMT +0000 => 2001012812:05:00 |
| 18 |
|
| 19 |
2001082812:05:00 GMT +0000 => 2001082812:05:00 |
| 20 |
|
| 21 |
2001082812:05:00 GMT BST => 2001082813:05:00 |
| 22 |
|
| 23 |
2001012812:05:00 GMT Europe/London => 2001012812:05:00 |
| 24 |
|
| 25 |
2007030113:34:34 +0000 +0100 => 2007030114:34:34 |
| 26 |
|
| 27 |
2007030113:34:34 +0000 -0100 => 2007030112:34:34 |
| 28 |
|
| 29 |
"; |
| 30 |
|
| 31 |
$::ti->tests(func => \&Date_ConvTZ, |
| 32 |
tests => $tests); |
| 33 |
$::ti->tests(func => \&Date_ConvTZ, |
| 34 |
tests => [ [ '2007030113:34:34', 'EST', 'GMT' ], |
| 35 |
[ '2007030113:34:34', '', 'GMT' ], |
| 36 |
[ '2007030113:34:34', undef, 'GMT' ] ], |
| 37 |
expected => "2007030118:34:34" ); |
| 38 |
$::ti->done_testing(); |
| 39 |
|
| 40 |
|
| 41 |
#Local Variables: |
| 42 |
#mode: cperl |
| 43 |
#indent-tabs-mode: nil |
| 44 |
#cperl-indent-level: 3 |
| 45 |
#cperl-continued-statement-offset: 2 |
| 46 |
#cperl-continued-brace-offset: 0 |
| 47 |
#cperl-brace-offset: 0 |
| 48 |
#cperl-brace-imaginary-offset: 0 |
| 49 |
#cperl-label-offset: 0 |
| 50 |
#End: |