From: Russell Penney Date: 2010-03-11T13:38:19+09:00 Subject: [ruby-core:28602] [Bug #2952] Time.strftime format %N Bug #2952: Time.strftime format %N http://redmine.ruby-lang.org/issues/show/2952 Author: Russell Penney Status: Open, Priority: Normal Category: core ruby -v: ruby 1.9.1p243 (2009-07-16 revision 24175) [i386-mingw32] There seems to be some rouding errors with the %N formatter for Time->strftime t1 = 1236922275.8516 t2 = Time.at(t1) puts t1 puts t2.to_f puts t1 == t2.to_f puts t2.strftime("%s.%6N") prints 1236922275.8516 1236922275.8516 true 1236922275.851599 The last line is wrong. I would expect it would print "1236922275.851600". If I use %4N I get 1236922275.8515 which is also wrong ---------------------------------------- http://redmine.ruby-lang.org