in reply to Providing Fractions of a second to DateTime?

use DateTime; my $timezone = 'UTC'; my $year = 2012; my $month = 6; my $day = 12; my $millisecond = 3600000; # 1.00 am my $dt = DateTime->new( year => $year, month => $month, day => $day, hour => 0, minute => 0, second => 0, nanosecond => 0, time_zone => $timezone, )->add( nanoseconds => ($millisecond * 1_000_000), ); print $dt;
perl -E'sub Monkey::do{say$_,for@_,do{($monkey=[caller(0)]->[3])=~s{::}{ }and$monkey}}"Monkey say"->Monkey::do'

Replies are listed 'Best First'.
Re^2: Providing Fractions of a second to DateTime?
by cmv (Chaplain) on Jun 12, 2012 at 15:00 UTC