Optimal way to store and pass a date to Javascript
- by user1493115
I need to store a date-time value in MySQL and subsequently display it on a webpage. Due to its flexibility I usually chose to store a Unix timestamp in the database and convert it with PHP's date() to the desired format.
This time however I would like to use MySQL's datetime field (mostly due to 2038) and apply the browser's timezone (hence I…