Why is GMT the standard for computer time instead of UTC?

It seems to me that wherever I saw algorithms related to time in programming, GMT was the main time. For example, I was told to always store the time in the database at GMT + 00, so that changes in time zones do not violate anything.

  • Am I right that GMT seems to be the main time zone in software development?

  • If so, why not UTC? Why is it not customary to say "UTC + 01" instead of "GMT + 01", given that even Unix timestamps are determined from UTC (http://en.wikipedia.org/wiki/Unix_time)

+6
source share
5 answers

GMT and UTC are the same time. UNIX time is based on UTC, so you can find more on UNIX and * nix systems.

UTC is also more accurately tracked as official time (i.e., more closely corresponds to the “true” time based on the Earth’s rotation). But if your software doesn't need calculations, they shouldn't matter if you use GMT or UTC.

Although, you might think about what to show users. One format may be more familiar than another. Usually I will use UTC for global applications and GMT for European or British applications.

+7
source

I thought it would be interesting to know that IANA timezones are currently using the abbreviation "GMT", both now and after 6 months (to catch them currently in the summertime).

Using this free open source C ++ 11/14 library, I wrote this program:

#include "tz.h" #include <string> #include <iostream> #include <vector> template <class Duration> std::vector<date::zoned_time<std::common_type_t<Duration, std::chrono::seconds>>> find_by_abbrev(date::sys_time<Duration> tp, const std::string& abbrev) { using namespace std::chrono; using namespace date; std::vector<zoned_time<std::common_type_t<Duration, seconds>>> results; auto& db = get_tzdb(); for (auto& z : db.zones) { if (z.get_info(tp).abbrev == abbrev) results.push_back(make_zoned(&z, tp)); } return results; } int main() { using namespace std::chrono; using namespace date; auto now = system_clock::now(); auto v = find_by_abbrev(now, "GMT"); for (auto const& x : v) std::cout << format("%F %H:%M:%S %Z %z", x) << " " << x.get_time_zone()->name() << '\n'; std::cout << '\n'; v = find_by_abbrev(now + months{6}, "GMT"); for (auto const& x : v) std::cout << format("%F %H:%M:%S %Z %z", x) << " " << x.get_time_zone()->name() << '\n'; } 

It searches for a planet for all time zones that currently use GMT, both now and after 6 months, and prints them:

 2016-06-18 01:00:25.632773 GMT +0000 Africa/Abidjan 2016-06-18 01:00:25.632773 GMT +0000 Africa/Accra 2016-06-18 01:00:25.632773 GMT +0000 Africa/Bissau 2016-06-18 01:00:25.632773 GMT +0000 Africa/Monrovia 2016-06-18 01:00:25.632773 GMT +0000 America/Danmarkshavn 2016-06-18 01:00:25.632773 GMT +0000 Atlantic/Reykjavik 2016-06-18 01:00:25.632773 GMT +0000 Etc/GMT 2016-12-17 15:55:01.632773 GMT +0000 Africa/Abidjan 2016-12-17 15:55:01.632773 GMT +0000 Africa/Accra 2016-12-17 15:55:01.632773 GMT +0000 Africa/Bissau 2016-12-17 15:55:01.632773 GMT +0000 Africa/Monrovia 2016-12-17 15:55:01.632773 GMT +0000 America/Danmarkshavn 2016-12-17 15:55:01.632773 GMT +0000 Atlantic/Reykjavik 2016-12-17 15:55:01.632773 GMT +0000 Etc/GMT 2016-12-17 15:55:01.632773 GMT +0000 Europe/Dublin 2016-12-17 15:55:01.632773 GMT +0000 Europe/London 

I was pleased to see that in all cases, the UTC offset was +0000 . You never know with politicians and time zones. Some legislators could easily proclaim Green Mountain Time (and maybe only tomorrow).

+3
source

This accepted answer is actually erroneous. Firstly, they are no different. The second UTC is not closer to the "true" time, based on the rotation of the Earth, just the opposite. UTC is more accurate in terms of a “temporary” measure. Each second lasts the same, because it is based on atomic time, and accuracy is the indexed height (it would take 30 thousand years to compensate for one second).

GMT instead tracks the Earth’s rotation, since it’s not always the same (Earth’s rotation slows down), every second is different. Of course, it has a very small amount of time. But for specific purposes, this is a much more accurate UTC than GMT.

It is for this reason that UTC changes +2 seconds every 4/5 years (since the rotation of the earth is slower, each second that is required to rotate should be longer than UTC), so it follows the time of the Earth’s rotation in less than less than second of difference.

+2
source

I would say that this is because most people are used to GMT. If you are going to display information to a person, in particular time, you need a format that they can easily understand. Using GMT saves the extra steps of converting to UTC and vice versa.

+1
source

GMT and UTC are not the same thing. Read https://en.wikipedia.org/wiki/Greenwich_Mean_Time and the link where there is UTC for differences.

Some computer users are confused by the fact that, prior to Windows 7, no Microsoft operating system fully supported UTC and thus retained the marking of the international time reference as GMT.

A key issue is how Windows reads and sets the BIOS clock. Windows XP cannot handle BIOS clock settings in UTC, so you must set the BIOX clock in local time and then rely on Windows to track the difference.

As in Windows 7, Windows can handle BIOS clock settings for UTC and does it perform all the calculations (mostly?) In accordance with UTC, so Microsoft decided to switch the tag from GMT to UTC.

Cm:

https://superuser.com/questions/185773/does-windows-7-support-utc-as-bios-time

+1
source

Source: https://habr.com/ru/post/906429/


All Articles