From: hanmac@... Date: 2018-05-28T13:36:56+00:00 Subject: [ruby-core:87277] [Ruby trunk Bug#14790] DateTime.iso8601 parses incorrect ISO8601 Issue #14790 has been updated by Hanmac (Hans Mackowiak). 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-72265 * Author: Quintasan (Micha�� Zaj��c) * Status: Open * Priority: Normal * Assignee: * Target version: * ruby -v: 2.4.2p198 * Backport: 2.3: UNKNOWN, 2.4: UNKNOWN, 2.5: UNKNOWN ---------------------------------------- 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) # => # Time.iso8601(date) # ArgumentError: invalid date: "2018-05-17T12:17:11+0200" ~~~ -- https://bugs.ruby-lang.org/ Unsubscribe: