PlaceAVote / pav-api

This repository contains the Placeavote API.
0 stars 0 forks source link

Only Accept UTC Timestamp for users Date of birth #91

Closed johnboy14 closed 8 years ago

johnboy14 commented 8 years ago

There are glaring deficiencies in our current back end in regards to DOB formats. Due to the inconsistent nature of date pickers between countries and browser types, we are getting DOBs in differing formats, e.g.

05/10/1984 DD/MM/YYYY 10/05/1984 MM/DD/YYYY 1984/10/05 YYYY/MM/DD

Right now we have some pretty hacky fixes to mitigate this problem but we need to fix it on the client and the backend.

We need to modify the API backend to accept a UTC Timestamp only e.g.

05/10/1984 => 465782400000

To mitigate the processing efforts we need to convert all users DOBs in DynamoDB to Unix Timestamps.

SudoPlz commented 8 years ago

That will be great!