-
Notifications
You must be signed in to change notification settings - Fork 2
Description
The observations API when called with json or geojson (default) format returns timestamp strings in iso8601 format, eg, 2021-01-03T21:36:18.064Z. This is both compact and ideal for parsing. In contrast, csv requests return timestamp strings that are more verbose and more oriented to human eyeballs, eg, Sun Jan 03 2021 21:36:18 GMT+0000 (Coordinated Universal Time). For consistency across formats, decreased payload size, and ease of parsing, the csv timestamp strings should be changed to also be iso8601.
Response format handling is done in https://github.com/communitysnowobs/cso-api/blob/master/src/observations/format.js. I don't see any explicit timestamp formatting taking place. Instead, the divergence seems to be an outcome of different defaults in JSON.stringify vs what's done in asCSV (String(value)?).