Project

General

Profile

Bug #6835

Rdoc for DateTime#strftime('%Q') says 'microseconds' instead if 'milliseconds'

Added by stomar (Marcus Stollsteimer) almost 7 years ago. Updated almost 7 years ago.

Status:
Closed
Priority:
Normal
Target version:
-
ruby -v:
1.9.3
Backport:
[ruby-core:46990]

Description

=begin
The patch fixes wrong rdoc for %Q, which returns the number of ((milli))seconds since the unix epoch, not ((micro))seconds.

(This is also the expected behavior according to the tests in test/date/test_date_strftime.rb)

This affects also Ruby 1.8.

1.9.3p194 :001 > require 'date'
1.9.3p194 :002 > d = DateTime.parse('1970-01-01T00:00:05.123456+00:00')
=> #
1.9.3p194 :003 > d.strftime('%s')
=> "5"
1.9.3p194 :004 > d.strftime('%Q')
=> "5123"
=end


Files

ext_date_rdoc_strftime_Q.patch (830 Bytes) ext_date_rdoc_strftime_Q.patch stomar (Marcus Stollsteimer), 08/04/2012 11:34 PM

History

Updated by tadf (tadayoshi funaba) almost 7 years ago

  • Status changed from Open to Assigned
  • Assignee changed from drbrain (Eric Hodel) to tadf (tadayoshi funaba)

Updated by tadf (tadayoshi funaba) almost 7 years ago

  • Status changed from Assigned to Closed

Also available in: Atom PDF