Project

General

Profile

Bug #5906

CSV converter option fails in case of :date_time

Added by siep korteling about 4 years ago. Updated over 3 years ago.

Status:
Rejected
Priority:
Normal
Assignee:
ruby -v:
ruby 1.9.3p0 (2011-10-30 revision 33570) [i686-linux]
Backport:
2.0.0: UNKNOWN, 2.1: UNKNOWN, 2.2: UNKNOWN, 2.3: UNKNOWN
[ruby-core:42171]

Description

The built-in converters of CSV with the name :date_time does not convert dates, nor does the :any converter

csv_converter_bug.rb Magnifier (295 Bytes) siep korteling, 01/19/2012 01:34 AM

0001-test-csv-test_data_converters.rb-test_builtin_date_time_converter_with_stamp.patch Magnifier (1.03 KB) Zachary Scott, 01/20/2012 03:09 AM

History

#1 [ruby-core:42176] Updated by Yui NARUSE about 4 years ago

  • Category set to lib
  • Status changed from Open to Assigned
  • Assignee set to James Gray

#3 [ruby-core:48140] Updated by James Gray over 3 years ago

  • Status changed from Assigned to Rejected
  • % Done changed from 0 to 100

The converters do work, just not on the date format you gave them.

Your format is ambiguous. Should we treat it as month-day-year as it would be in the U.S. or day-month-year as it would be in the U.K.? Because we can't know, we don't support that format by default. The year-month-day format is supported, plus month name, day year. These are chosen because they are unambiguous.

If you need to support a different format, just add your own converter. You will know how your dates look, so it's easy for you to parse it correctly.

I hope that makes sense.

Also available in: Atom PDF