Is GMT same as UTC?

I am running a world targeted website where people from all over the world visit. The database contains time in International Date Line West format. I am taking the user time zone using JavaScript and converting the time in the database to user’s time and then showing on the page. I want to ask that is International Date Line West is correct format for world level website? Or setting to UTC or GMT will be better? And what is the difference between UTC and GMT and International Date Line West? Are these three same? Finally what time should I set onto my server that will be converted using offset of timezone of user?

Answers:

Thank you for visiting the Q&A section on Magenaut. Please note that all the answers may not help you solve the issue immediately. So please treat them as advisements. If you found the post helpful (or not), leave a comment & I’ll get back to you as soon as possible.

Method 1

UTC is effectively the new name for GMT. It has very minor differences, but none that will impact you in that scenario.

Servy’s comment is completely wrong saying GMT includes daylight savings. That’s a different timezone called BST that the UK moves to from GMT over summer.

Method 2

If you’re interested in astronomical observations, for example of satellites such as GPS, or if you want to cite a technical standard (ITU-R TF.460-6), then you might care that we use UTC and that GMT no longer has a precise definition. Otherwise you probably consider GMT to be the same thing as UTC, and also consider UT and UT1 to be the same as UTC — which technically they are not.

Also, if you’re tracking computer criminals or other distributed activity, then you need to determine whether certain events at various sites may or may not have occurred before certain other events. For that purpose you will want to learn and use Network Time Protocol (NTP). That will have a much bigger effect on your understanding of time than the little differences between UTC, UT1, and UT.

International Date Line West” is just a friendly name for a timezone where the time is defined as twelve hours less than UTC (that is, UTC-12).

Method 3

Usually when you have to present dates or times to people in different timezones what you should do is save all time information in UTC on your database and convert it to the users timezone on the display layer (when your presenting the information to your user)

However you will find a couple of challenges:
– The timezone you get from javascript may not be trustworthy
– Finding the location of the user through the IP and then getting the timezone is also not trustworthy

A good approach in my opinion is to use a “best guess” to find the default timezone (javascript timezone should suffice) and give the user the ability to actively configure his timezone.

On some google applications their approach is to prompt the user for his timezone before starting, this should be done only when you can guarantee that you don’t have to repeat this every time the user visits your site (through user accounts or cookies)


All methods was sourced from stackoverflow.com or stackexchange.com, is licensed under cc by-sa 2.5, cc by-sa 3.0 and cc by-sa 4.0

0 0 votes
Article Rating
Subscribe
Notify of
guest

0 Comments
Inline Feedbacks
View all comments
0
Would love your thoughts, please comment.x
()
x