On 8/26/03 2:10 PM, Eugene van der Pijll wrote:
> * You might want to show some date math:
> 
>   $dt1 = DateTime->now();
> 
>   # One week ago:
>   $dt2 = $dt1->clone->subtract( weeks => 1);
> 
>   print $dt2->datetime, "\n";

...except you almost certainly want to do this:

    $dt1 = DateTime->now(time_zone => 'local');

unless you're really trying to print the date and time one week ago
somewhere in England...

-John

Reply via email to