I have read quite a bit on storing timestamps in UTC and keeping the timestamps in UTC until the last possible moment (i.e. when it is displayed to the user in the browser).
However, I am still a bit confused, or rather "unsure", of whether or not I am doing this properly. I would like to work completely with UTC time everywhere.
My stack currently consists of AngularJS + Flask + SqlAlchemy + Postgresql.
Right now at the moment my postgresql timestamp columns do not include a timestamp. For example, I have the following column in a table that is set by the user from the web interface:
send_at | timestamp without time zone |
If I need to receive a Date/Time from the user, how should I send that from my UI to the the server (should it just be a utc timestamp or some other timestamp format)?
Currently, when displaying times, I just send the Timestamp from the database to the browser and format it using the built in AngularJS Date filter.
What is the correct way to get the timestamp from Javascript that I would send through my API to the server to be stored in the database? I am currently using this SO answer on this from here.