Reputation: 13
So I've made a complete system based on/relative to server time assuming that the server time was gonna stay the same and not change. I've used the date() function to get the server time throughout the application. Then we felt the need to cater for different time zones. For example state of Illinois can have two different times zones within the state i.e. eastern time and central time.
Similarly USA can potentially have 5 different time zones within the country.
Now what my approach is that I'd have the user tell me when signing up on my website that which time zone does he come under and based on that, make my calculations relative to his input.
So what I want to know is, how can we cater for different time zones using the date() function. Or if anyone has a better approach to solving this issue, I'm all ears :-)
Upvotes: 1
Views: 160
Reputation: 3661
Feed it time in one time zone, set time zone, output time in other time zone. The examples following the link illustrate it very well.
Upvotes: 1