[#68478] Looking for MRI projects for Ruby Google Summer of Code 2015 — Tony Arcieri <bascule@...>

Hi ruby-core,

10 messages 2015/03/10

[ruby-core:68418] [Ruby trunk - Bug #10936] [Open] Error in Rubydoc for DateTime#rfc3339

From: andirayo@...
Date: 2015-03-04 23:07:57 UTC
List: ruby-core #68418
Issue #10936 has been reported by (Andreas) Rayo Kniep.

----------------------------------------
Bug #10936: Error in Rubydoc for DateTime#rfc3339
https://bugs.ruby-lang.org/issues/10936

* Author: (Andreas) Rayo Kniep
* Status: Open
* Priority: Low
* Assignee: 
* ruby -v: 2.1.5
* Backport: 2.0.0: UNKNOWN, 2.1: UNKNOWN, 2.2: UNKNOWN
----------------------------------------
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
~~~



-- 
https://bugs.ruby-lang.org/

In This Thread

Prev Next