Time.strptime error, invalid format

Checked under (ruby 2.3.0p0) was using other versions too so it is not
unique to 2.3.0.

So I have a time.

time_string = ‘2015-06-11T09:00:56.717Z’

I am trying to parse it with strptime.

This fails
my_time = Time.strptime(time_string, “%Y-%m-%dT%H:%M:%S.%3NZ”)

error msg
invalid strptime format - `%Y-%m-%dT%H:%M:%S.%3NZ’ (ArgumentError)

If I do this. it works

my_time = Time.strptime(time_string, “%Y-%m-%dT%H:%M:%S.%LZ”)

All fine and dandy. So, my question is why does the first one fail?
Looking at the docs.

http://ruby-doc.org/stdlib-2.3.0/libdoc/time/rdoc/Time.html#method-c-strptime

This should work. At least how I read it.

This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.

| Privacy Policy | Terms of Service | Remote Ruby Jobs