From: nobu@... Date: 2018-08-24T16:04:14+00:00 Subject: [ruby-core:88634] [Ruby trunk Bug#15023] Time precision (in microsecond) inaccurate after performing strftime Issue #15023 has been updated by nobu (Nobuyoshi Nakada). `Time.at` supports `Rational` numbers too. puts Time.at(1486525793.995r).strftime("%s.%6N") #=> 1486525793.995000 ---------------------------------------- Bug #15023: Time precision (in microsecond) inaccurate after performing strftime https://bugs.ruby-lang.org/issues/15023#change-73693 * Author: calvinchso (Calvin So) * Status: Rejected * Priority: Normal * Assignee: * Target version: * ruby -v: ruby 2.5.1p57 (2018-03-29 revision 63029) [x86_64-darwin17] * Backport: 2.3: UNKNOWN, 2.4: UNKNOWN, 2.5: UNKNOWN ---------------------------------------- Please see the example below. I think we should expect the result to be "1486525793.995". Right? OS version: MacOS High Sierra 10.13.6 Ruby version: 2.5.1 ~~~ ruby 2.5.1 :005 > Time.at(1486525793.995).strftime("%s.%6N") => "1486525793.994999" ~~~ -- https://bugs.ruby-lang.org/ Unsubscribe: