urbanriskmap / cognicity-rem-analysis

single page webapp to help analyze previous disaster events captured by cognicity
MIT License
1 stars 0 forks source link

Timestamp mismatch #7

Open matthewberryman opened 7 years ago

matthewberryman commented 7 years ago

You specify start and end times with a timezone offset but the API expects Zulu (UTC) {"statusCode":400,"error":"Bad Request","message":"child \"start\" fails because [\"start\" must be a string with one of the following formats [YYYY-MM-DDTHH:mm:ssZ]]","validation":{"source":"query","keys":["start"]}}

tomasholderness commented 7 years ago

Hi @matthewberryman, the API expects an UTC offset in the form of "+0700" or "-0500". Confusingly the short hand for this in moment.js date formatting is "Z" for "zulu offset" not "zulu time".

For example a start time of "2017-02-21T07:10:00+0700" would return all reports that occurred after 07:10 AM at UTC+0700 (Indonesia).

matthewberryman commented 7 years ago

Should it work for offsets too? It's not working for me at +1100. Given we may want to roll this out for other regions I don't think we should be specific to -0500 or +0700.