On Sat, Jan 21, 2012 at 9:52 PM, Kenichi Kamiya <kachick1 / gmail.com> wrote:

> Hi
>
> Is this log fomart below meanings?
>  mon/day/year hour:min:sec:millisec
> And Time.parse is not better this case, I guess.
> And Christopher want to millisec? then you use padding 0 or cast to Time
>
> # a sample of "cast to Time" with  Peter's test case(+)
> http://ideone.com/tBz7D
>
>
Thank you for the correction.

Indeed, because of the variable width on the milliseconds (1 to 3 digits),
you can have

12/31/2011 23:45:30:2

seemingly later than

12/31/2011 23:45:30:10



> # Note
> "%L" in Time#strftime means 'microsec', I did't know this too.
>

I believe that is not correct. It seems to be "milliseconds".

from http://ruby-doc.org/core-1.9.3/Time.html
the section "strftime( string ) вк string"


%L - Millisecond of the second (000..999)

%N - Fractional seconds digits, default is 9 digits (nanosecond)
          %3N  millisecond (3 digits)
          %6N  microsecond (6 digits)
          %9N  nanosecond (9 digits)
          %12N picosecond (12 digits)

HTH,

Peter

-- 
Peter Vandenabeele
http://twitter.com/peter_v
http://rails.vandenabeele.com