Good strategies for User timezones

This isn’t specific to Slim, but I’m wondering how various people deal with user timezones. My planned approach is to set my database and PHP to always use UTC. For users, fetch timezone with moment.js or jsTimezoneDetect.js and store timezone for each user in the database. In my views, I’d then offset UTC by the logged in user using some sort of getter in my models.

My goto for this is Derick’s Storing Date/Times in Databases post.

1 Like