(This is a question about the UI rather than the technology required to do it)
What is the clearest way to display a time for events occurring in different timezones to a user? Does your "average" user understand UTC and timezones?
We capture the local time and UTC offset and store it in the database (SQL 2008 DateTimeOffset) for events happening in different timezones. Users are also in a variety of timezones.
I'll suggest a couple of answers below so they can be rated but I'd appreciate alternative suggestions.
EDIT: I'd like to avoid displaying the time in the user's timezone. Users in different timezones will be discussing the same events and if they're local to different timezones, there'll be confusion.
EDIT: I wanted to make the question generic and hopefully useful to more people but for some specific context, this is a web application for tracking parcels (think FedEx). Parcels will cross timezones. Customer support is in the UK but the recipient may be elsewhere.
If your site allows registration, you can store the user timezone as user preference. In the user table, store the user timezone. Then create a custom helper you can use to format any date/time into the proper timezone using the in_time_zone method.
You can set any specific time zone using the PHP function date_default_timezone_set . This sets the specified time zone for users. Basically the users' time zone is goes to the client side, so we must use JavaScript for this.
A time zone is an area that observes a uniform standard time for legal, commercial and social purposes. Time zones tend to follow the boundaries between countries and their subdivisions instead of strictly following longitude, because it is convenient for areas in frequent communication to keep the same time.
Try an old-style newsroom graphic, where you have clocks labeled "New York", "London", "Tokyo" and then "Papua, New Guinea" or wherever your particular viewer is located. You can make the clocks analog or digital or both.
No one will be confused by this, whereas I don't think most people really know what GMT+7 (or whatever) means.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With