use strict; use warnings; use DateTime qw( ); use DateTime::Format::MySQL qw( ); my $now = DateTime->new( year => 2009, month => 10, day => 5, hour => 14, minute => 48, second => 9, time_zone => 'America/New_York', ); my $then = DateTime::Format::MySQL->parse_datetime( '2009-10-06 18:00:00', ); for (1..2) { my $diff = $then->delta_ms($now); print( $diff->in_units('minutes'), "\n" ); $then->set_time_zone('America/New_York'); } #### 191 1631