Project

General

Profile

Actions

Bug #16768

closed

"\n" started not to work as a delimiter in time zone names for Date._strptime since 2.7.0

Added by dmikurube (Dai MIKURUBE) almost 4 years ago. Updated almost 4 years ago.

Status:
Rejected
Assignee:
-
Target version:
-
[ruby-dev:50927]

Description

Confirmed on: Ruby 2.7.0 on Mac OS X 10.13.

require 'date'
DateTime._strptime("aus\neastern standard time", "%z")

Expected (Ruby 2.6.3 works like this):

=> {:zone=>"aus\neastern standard time", :offset=>36000}

Actual on Ruby 2.7.0 :

=> {:zone=>"aus\neastern standard time", :offset=>nil}

Appendix:

  • A space character case, such as "aus eastern standard time", still works on Ruby 2.7.0.

Updated by jeremyevans0 (Jeremy Evans) almost 4 years ago

  • Status changed from Open to Rejected

This seems more like a bugfix than a regression to me, even if the change was unintended. Is there a reason you would want the previous behavior? In any case, issues in the date library should be filed upstream: https://github.com/ruby/date/issues

Actions

Also available in: Atom PDF

Like0
Like0