in reply to Re^2: Providing Fractions of a second to DateTime?
in thread Providing Fractions of a second to DateTime?

$dt = DateTime->new( year=>2003, month=>6, day=>12, hour=>7, minute=>22, second=>12, millisecond=>345, microsecond=>678, nanosecond=>901 );

this should also work and use $dt->millisecond() for your calculations
refer cpan

Replies are listed 'Best First'.
Re^4: Providing Fractions of a second to DateTime?
by tobyink (Canon) on Jun 12, 2012 at 14:35 UTC

    i think this should also work

    It doesn't.

    perl -E'sub Monkey::do{say$_,for@_,do{($monkey=[caller(0)]->[3])=~s{::}{ }and$monkey}}"Monkey say"->Monkey::do'

      sorry tobyink my fault
      constructor doesnt support milli seconds and microseconds