Проблема 2038 года в вычислительной технике — ожидаемые сбои в программном обеспечении накануне 19 января 2038 года. Данная проблема затронет программы и системы, в которых используется представление времени по
- стандарту POSIX (UNIX-время), которое представляет собой количество секунд, прошедшее с полуночи 1 января 1970 года. Такое представление времени — это стандарт для Unix-подобных операционных систем (из-за повсеместного использования языка Си).
-
Сейчас значение Unix timestamp равно .
-
В чём проблема?
-
В старых 32-битных системах (до середины 1990-х) используется тип данных time_t для хранения секунд в виде signed int (32-битного целого со знаком). Самая поздняя дата, которая может быть представлена таким форматом в стандарте POSIX — это 03:14:07, вторник, 19 января 2038 года по Всемирному времени (UTC).
-
Более позднее время заставит такое поле данных стать отрицательным, как бы закольцевав таким образом время (поскольку отрицательное число может быть воспринято программами как время в 1970 или 1901 году, в зависимости от реализации). В результате любые расчёты, включающие дату позже 19 января 2038 года, могут привести к сбою программы либо к ошибочным вычислениям.
-
Для проблемы 2038 года не существует простого решения для существующих комбинаций операционных систем и прикладного программного обеспечения. Изменение определения типа time_t на 64 бита нарушит бинарную совместимость программ, существующих хранимых данных и всего другого, использующего представление времени в бинарном виде. А приведение time_t в целое без знака может нарушить работу программ, которые вычисляют разницу во времени.
-
Что подвержено этой проблеме?
-
Многие структуры данных, которые используются сегодня, имеют 32-битные представления времени, встроенные в их структуру. Полный список этих структур данных практически невозможно составить, но есть хорошо известные структуры данных, у которых есть проблема времени Unix:
-
-
файловые системы (многие файловые системы используют только 32 бита для представления времени в индексных дескрипторах)
-
форматы двоичных файлов (в которых используются 32-битные поля времени)
-
базы данных (которые имеют 32-битные поля времени)
-
языки запросов к базам данных, такие как SQL, которые имеют команды, похожие на UNIX_TIMESTAMP()
-
-
Примеры систем, использующих структуры данных, которые могут содержать 32-битные представления времени, включают:
-
-
встроенные подсистемы управления и мониторинга завода, НПЗ
-
различное медицинское, военное оборудование
-
-
Любая система, использующая структуры данных, содержащие 32-битные представления времени, представляет риск. Степень риска зависит от характера отказа.
-
Использованные материалы при составлении этого текста
The Year 2038 problem in computing technology - expected failures in software on the eve of January 19, 2038. This problem will affect the programs and systems that use the presentation view according to the POSIX standard (UNIX-time), which is the number of seconds passed from midnight on January 1, 1970. Such a presentation of time is a standard for UNIX-like operating systems (due to the ubiquitous use of the C language).
-
Now the UNIX timestamp value is .
-
What is the problem?
-
In the old 32-bit systems (until the mid-1990s), the time_t data type is used to store seconds in the form of signed int (32-bit integer with the sign). The most late date, which can be represented by this format in POSIX Standard - is 03:14:07, Tuesday, January 19, 2038 for World Time (UTC).
-
Later time will cause such a field to become negative, as if looping the time in this way (since a negative number can be interpreted by programs as time in 1970 or 1901, depending on the implementation). As a result, any calculations that include a date later than January 19, 2038 may cause the program to crash or cause erroneous calculations.
-
For the year 2038 problem, there is no universal solution for existing combinations of operating systems and application software. Changing the definition of the time_t type to 64 bits will break the binary compatibility of programs, existing stored data, and anything else that uses a binary representation of time. And casting time_t to an unsigned integer can break programs that compute the time difference.
-
What is affected by this problem?
-
Many data structures that are used today have 32-bit time presentations built into their structure. The complete list of these data structures is almost impossible to compile, but there are well-known data structures that have a UNIX time problem:
-
-
file Systems (Many file systems use only 32 bits to submit time in index descriptors)
-
binary file formats (in which 32-bit time are used)
-
databases (which have 32-bit time fields)
-
languages requests for databases, such as SQL, which have commands similar to UNIX_TIMESTAMP()
-
-
Examples of systems using data structures that may contain 32-bit presentations of the time include:
-
-
embedded management and monitoring subsystems, refinery
-
various medical, military equipment
-
-
Any system that uses data structures containing 32-bit time represents the risk. The degree of risk depends on the nature of the failure.
Проблема 2038 года в вычислительной технике — ожидаемые сбои в программном обеспечении накануне 19 января 2038 года. Данная проблема затронет программы и системы, в которых используется представление времени по
+ стандарту POSIX (UNIX-время), которое представляет собой количество секунд, прошедшее с полуночи 1 января 1970 года. Такое представление времени — это стандарт для Unix-подобных операционных систем (из-за повсеместного использования языка Си).
+
Сейчас значение Unix timestamp равно .
+
В чём проблема?
+
В старых 32-битных системах (до середины 1990-х) используется тип данных time_t для хранения секунд в виде signed int (32-битного целого со знаком). Самая поздняя дата, которая может быть представлена таким форматом в стандарте POSIX — это 03:14:07, вторник, 19 января 2038 года по Всемирному времени (UTC).
+
Более позднее время заставит такое поле данных стать отрицательным, как бы закольцевав таким образом время (поскольку отрицательное число может быть воспринято программами как время в 1970 или 1901 году, в зависимости от реализации). В результате любые расчёты, включающие дату позже 19 января 2038 года, могут привести к сбою программы либо к ошибочным вычислениям.
+
Для проблемы 2038 года не существует простого решения для существующих комбинаций операционных систем и прикладного программного обеспечения. Изменение определения типа time_t на 64 бита нарушит бинарную совместимость программ, существующих хранимых данных и всего другого, использующего представление времени в бинарном виде. А приведение time_t в целое без знака может нарушить работу программ, которые вычисляют разницу во времени.
+
Что подвержено этой проблеме?
+
Многие структуры данных, которые используются сегодня, имеют 32-битные представления времени, встроенные в их структуру. Полный список этих структур данных практически невозможно составить, но есть хорошо известные структуры данных, у которых есть проблема времени Unix:
+
+
файловые системы (многие файловые системы используют только 32 бита для представления времени в индексных дескрипторах)
+
форматы двоичных файлов (в которых используются 32-битные поля времени)
+
базы данных (которые имеют 32-битные поля времени)
+
языки запросов к базам данных, такие как SQL, которые имеют команды, похожие на UNIX_TIMESTAMP()
+
+
Примеры систем, использующих структуры данных, которые могут содержать 32-битные представления времени, включают:
+
+
встроенные подсистемы управления и мониторинга завода, НПЗ
+
различное медицинское, военное оборудование
+
+
Любая система, использующая структуры данных, содержащие 32-битные представления времени, представляет риск. Степень риска зависит от характера отказа.
+
Использованные материалы при составлении этого текста
The Year 2038 problem in computing technology - expected failures in software on the eve of January 19, 2038. This problem will affect the programs and systems that use the presentation view according to the POSIX standard (UNIX-time), which is the number of seconds passed from midnight on January 1, 1970. Such a presentation of time is a standard for UNIX-like operating systems (due to the ubiquitous use of the C language).
+
Now the UNIX timestamp value is .
+
What is the problem?
+
In the old 32-bit systems (until the mid-1990s), the time_t data type is used to store seconds in the form of signed int (32-bit integer with the sign). The most late date, which can be represented by this format in POSIX Standard - is 03:14:07, Tuesday, January 19, 2038 for World Time (UTC).
+
Later time will cause such a field to become negative, as if looping the time in this way (since a negative number can be interpreted by programs as time in 1970 or 1901, depending on the implementation). As a result, any calculations that include a date later than January 19, 2038 may cause the program to crash or cause erroneous calculations.
+
For the year 2038 problem, there is no universal solution for existing combinations of operating systems and application software. Changing the definition of the time_t type to 64 bits will break the binary compatibility of programs, existing stored data, and anything else that uses a binary representation of time. And casting time_t to an unsigned integer can break programs that compute the time difference.
+
What is affected by this problem?
+
Many data structures that are used today have 32-bit time presentations built into their structure. The complete list of these data structures is almost impossible to compile, but there are well-known data structures that have a UNIX time problem:
+
+
file Systems (Many file systems use only 32 bits to submit time in index descriptors)
+
binary file formats (in which 32-bit time are used)
+
databases (which have 32-bit time fields)
+
languages requests for databases, such as SQL, which have commands similar to UNIX_TIMESTAMP()
+
+
Examples of systems using data structures that may contain 32-bit presentations of the time include:
+
+
embedded management and monitoring subsystems, refinery
+
various medical, military equipment
+
+
Any system that uses data structures containing 32-bit time represents the risk. The degree of risk depends on the nature of the failure.