dataconverters icon indicating copy to clipboard operation
dataconverters copied to clipboard

Date and Date Time casting and precision issues (for discussion)

Open rufuspollock opened this issue 13 years ago • 2 comments

Currently have the problem that a csv file with the following input:

 2012-08-11

Will get converted and returned as:

 2012-08-11T00:00:00

The basic issue is that we don't get a sense of precision.

There are several options:

  1. Guess type but do not use this for parsing (bad IMO because we don't convert thursday 25th january to something standard - though this could be a good thing ??)
  2. Leave it to clients to strip unnecessary precision
  3. Do a hack to strip T00:00:00 style stuff from all dates when do serialization to json ...

rufuspollock avatar Jan 19 '13 13:01 rufuspollock

I'd go with option 2. Clients can easily strip out unnecessary precision as long as we're sending data in one standard format, which we are.

nigelbabu avatar Jan 21 '13 01:01 nigelbabu

Right but it is sort of unexpected and leads to data changing from it source - e.g. i see 2012-08-01 in the csv source but end up with 2012-08-01 00:00:00 or similar ...

rufuspollock avatar Jan 21 '13 09:01 rufuspollock