Working with time zones
Since MySQL doesn't support storing time zone information with datetime data types, I recommend choosing a time zone that you will store your data in—for example, Coordinated Universal Time (UTC), or the time zone that the server is in—and let the application handle any local time zones that need to be displayed. If a user is in New York and they are using the application, and they need to see the time in the Eastern time zone, the application will convert it on display from the time stored in the database to their time zone. If users are inserting data into the database, and an insert date is captured for that inserted data (which is good practice), then it will be inserted into the database in the database time ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Read now
Unlock full access