When I run the below code it works, but the epoch date prints in scientific
notation. Is there a way I can force this to print in regular notation? I
guess I could use a regex but there should be a way just to print something
the correct way, no?

<-----output>
>datetime.pl 
19980323165814
+890672294E+0 <-------- how do I get 890672294 instead of this?
1998
> 

<-------code>
#!/usr/rand/bin/perl -w
use DateTime::Precise;
use DateTime::Precise qw (:TimeVars);

$t1 = DateTime::Precise->new;
$t1->set_from_datetime('1998.03.23 16:58:14');

print "$t1\n";
#this line gives unexpected output:
print $t1->unix_seconds_since_epoch;
print "\n";
print $t1->year;
print "\n";

-- 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to