dataconverters
dataconverters copied to clipboard
Date and Date Time casting and precision issues (for discussion)
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:
- 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 ??)
- Leave it to clients to strip unnecessary precision
- Do a hack to strip T00:00:00 style stuff from all dates when do serialization to json ...
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.
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 ...