Project

General

Profile

Actions

Bug #10936

closed

Error in Rubydoc for DateTime#rfc3339

Bug #10936: Error in Rubydoc for DateTime#rfc3339

Added by andirayo ((Andreas) Rayo Kniep) over 10 years ago. Updated over 7 years ago.

Status:
Closed
Assignee:
-
Target version:
-
ruby -v:
2.1.5
[ruby-core:68418]

Description

There is an error in the Ruby-documentation of instance method #rfc3339 of class DateTime (eg. Ruby-version 2.1.5)

rfc3339() is actually equivalent to strftime(‘%FT%T%Z’)...
... and not, as it says in the Ruby-documentation, to strftime(‘%FT%T’).

See
http://ruby-doc.org//stdlib-2.1.5/libdoc/date/rdoc/DateTime.html#method-i-rfc3339

Compare

irb(main):001:0> require 'date'
=> true
irb(main):002:0> DateTime.new( 2015, 03, 04, 15, 00, 00, 'PST' ).rfc3339 == DateTime.new( 2015, 03, 04, 15, 00, 00, 'PST' ).strftime('%FT%T%Z')
=> true
irb(main):003:0> DateTime.new( 2015, 03, 04, 15, 00, 00, 'PST' ).rfc3339 == DateTime.new( 2015, 03, 04, 15, 00, 00, 'PST' ).strftime('%FT%T')
=> false

Updated by stomar (Marcus Stollsteimer) over 8 years ago Actions #1

  • Status changed from Open to Closed

Applied in changeset r58020.


date_core.c: fix error in DateTime docs

  • ext/date/date_core.c: [DOC] fix format string for DateTime#rfc3339.
    Reported by Andreas Rayo Kniep. [ruby-core:68418] [Bug #10936]

  • ext/date/date_core.c: [DOC] ditto for DateTime#iso8601 and
    DateTime#xmlschema; other small improvements.

Updated by stomar (Marcus Stollsteimer) over 8 years ago Actions #2 [ruby-core:80230]

Fixed. The actually used format is "%FT%T%:z".

Updated by usa (Usaku NAKAMURA) over 8 years ago Actions #3

  • Backport changed from 2.0.0: UNKNOWN, 2.1: UNKNOWN, 2.2: UNKNOWN to 2.2: REQUIRED, 2.3: REQUIRED, 2.4: REQUIRED

Updated by usa (Usaku NAKAMURA) over 8 years ago Actions #4 [ruby-core:80358]

  • Backport changed from 2.2: REQUIRED, 2.3: REQUIRED, 2.4: REQUIRED to 2.2: DONE, 2.3: REQUIRED, 2.4: REQUIRED

ruby_2_2 r58128 merged revision(s) 58020.

Updated by nagachika (Tomoyuki Chikanaga) almost 8 years ago Actions #5 [ruby-core:84368]

  • Backport changed from 2.2: DONE, 2.3: REQUIRED, 2.4: REQUIRED to 2.2: DONE, 2.3: REQUIRED, 2.4: DONE

ruby_2_4 r61365 merged revision(s) 58020.

Updated by usa (Usaku NAKAMURA) over 7 years ago Actions #6 [ruby-core:85289]

  • Backport changed from 2.2: DONE, 2.3: REQUIRED, 2.4: DONE to 2.2: DONE, 2.3: DONE, 2.4: DONE

ruby_2_3 r62128 merged revision(s) 58020.

Actions

Also available in: PDF Atom