[#86787] [Ruby trunk Feature#14723] [WIP] sleepy GC — ko1@...

Issue #14723 has been updated by ko1 (Koichi Sasada).

13 messages 2018/05/01
[#86790] Re: [Ruby trunk Feature#14723] [WIP] sleepy GC — Eric Wong <normalperson@...> 2018/05/01

ko1@atdot.net wrote:

[#87095] [Ruby trunk Feature#14767] [PATCH] gc.c: use monotonic counters for objspace_malloc_increase — ko1@...

Issue #14767 has been updated by ko1 (Koichi Sasada).

9 messages 2018/05/17

[ruby-core:87283] [Ruby trunk Bug#14790] DateTime.iso8601 parses incorrect ISO8601

From: ruby-lang.org@...
Date: 2018-05-28 19:06:53 UTC
List: ruby-core #87283
Issue #14790 has been updated by Quintasan (Michał Zając).


Yes, you are right. It was a bug after all but not in the way I originally thought :D.

Hanmac (Hans Mackowiak) wrote:
> you mean the offset right?
> 
> https://en.wikipedia.org/wiki/ISO_8601#Time_zone_designators says that "±hhmm" is valid too in iso8601
> 
> so i think the bug is more in Time because the offset should be valid?
> 
> Time itself does print it as "+0200" on inspect



----------------------------------------
Bug #14790: DateTime.iso8601 parses incorrect ISO8601
https://bugs.ruby-lang.org/issues/14790#change-72272

* Author: Quintasan (Michał Zając)
* Status: Closed
* Priority: Normal
* Assignee: 
* Target version: 
* ruby -v: 2.4.2p198
* Backport: 2.3: REQUIRED, 2.4: REQUIRED, 2.5: REQUIRED
----------------------------------------
I noticed it today when migrating to Time in my library but DateTime somehow parses incorrect ISO8601 dates. Technically that's a feature but I believe this behaviour is incorrect. Time#iso8601 behaves correctly in this case.

# Steps to reproduce

~~~ ruby
require 'time'
date = "2018-05-17T12:17:11+0200"
DateTime.iso8601(date) # => #<DateTime: 2018-05-17T12:17:11+02:00 ((2458256j,37031s,0n),+7200s,2299161j)>
Time.iso8601(date) # ArgumentError: invalid date: "2018-05-17T12:17:11+0200"
~~~





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

Unsubscribe: <mailto:ruby-core-request@ruby-lang.org?subject=unsubscribe>
<http://lists.ruby-lang.org/cgi-bin/mailman/options/ruby-core>

In This Thread

Prev Next