impedans
impedans

Reputation: 3

Change database timestamp output based on user timezone

This has never been necessary before when I've been using timestamps before, but for some reason all of my timestamps are 7 hours behind. Now I could change the database timezone and be done with it, but what about my visitors from other countries?

So what I'm asking is, is there any way I can possibly do this on PHPMyAdmin, or in SQL? Or do I have to use PHP? In which case where do I even start?

Upvotes: 0

Views: 52

Answers (1)

Calvin Froedge
Calvin Froedge

Reputation: 16373

I think your best bet is to keep the way you're storing dates in your database consistent, and localize for specific users, as in this example:

Changing timezone of a retrieved date in php

Upvotes: 0

Related Questions