Time t

Time t

UNIX-время или POSIX-время (англ. Unix time) — способ кодирования времени, принятый в POSIX-совместимых операционных системах.

Моментом начала отсчёта считается полночь (по UTC) с 31 декабря 1969 года на 1 января 1970, время с этого момента называют «эрой UNIX» (англ. Unix Epoch).

Время UNIX согласуется с UTC, в частности, при объявлении високосных секунд UTC соответствующие номера секунд повторяются.

Способ хранения времени в виде количества секунд очень удобно использовать при сравнении дат (с точностью до секунды), а также для хранения дат: при необходимости их можно преобразовать в любой удобочитаемый формат. Дата и время в этом формате также занимают очень мало места (4 или 8 байтов, в зависимости от размера машинного слова), поэтому его разумно использовать для хранения больших объёмов дат. Недостатки в производительности могут проявиться при очень частом обращении к элементам даты, вроде номера месяца и т. п. Но в большинстве случаев эффективнее хранить время в виде одной величины, а не набора полей.

Чтобы узнать текущее UNIX-время в большинстве UNIX-подобных систем, можно использовать команду date +%s.

13 февраля 2009 года в 23:31:30 по UTC (02:31:30 14 февраля по MSK) значение UNIX-времени достигло 1234567890 секунд.

19 января 2038 года в 03:14:08 по всемирному времени значение переменной типа time_t, отсчитывающей число секунд, прошедших с 1 января 1970 года, достигнет 231, что может привести к ошибочной интерпретации этого числа как отрицательного. Возможное решение данной проблемы состоит в использовании не 32-битной, а 64-битной переменной для хранения времени, чего хватит ещё на 300 миллиардов лет.

См. также


Wikimedia Foundation. 2010.

Игры ⚽ Поможем написать реферат

Полезное


Смотреть что такое "Time t" в других словарях:

  • Time — Time, n.; pl. {Times}. [OE. time, AS. t[=i]ma, akin to t[=i]d time, and to Icel. t[=i]mi, Dan. time an hour, Sw. timme. [root]58. See {Tide}, n.] 1. Duration, considered independently of any system of measurement or any employment of terms which… …   The Collaborative International Dictionary of English

  • Time — • Article explores two questions, What are the notes, or elements, contained in the subjective representation of time? and To what external reality does this representation correspond? Catholic Encyclopedia. Kevin Knight. 2006. Time     Time …   Catholic encyclopedia

  • Time's Up! — is a grassroots environmental group that seeks to promote a more sustainable, less toxic New York City. For 20 years, it has been committed to improving the environment by empowering individuals to become active in their community. In New York… …   Wikipedia

  • TIME — (magazine) Pour les articles homonymes, voir Time.  Time Magazine {{{nomorigine}}} …   Wikipédia en Français

  • TIME — Erstausgabe 1923 Beschreibung Nachrichtenmagazi …   Deutsch Wikipedia

  • Time — Time …   Deutsch Wikipedia

  • Time.h — Saltar a navegación, búsqueda time.h es un archivo de cabecera de la biblioteca estándar del lenguaje de programación C que contiene funciones para manipular y formatear la fecha y hora del sistema. Contenido 1 Funciones 2 Constantes 3 Tipo …   Wikipedia Español

  • Time UK — is a computer retailer set up by the people behind the failed Time Computer Systems.The company is based within the main factory offices at Time Technology Park in Simonstone, near Burnley in Lancashire. The company specializes in providing… …   Wikipedia

  • TIME — Premier élément d’un gigantesque empire de presse dont l’histoire est intimement liée à l’action d’une des plus fortes personnalités du journalisme américain, Henry R. Luce (1903 1967), et à son ami Britton Hadden. La création du Time Weekly News …   Encyclopédie Universelle

  • time — I noun age, chronology, duration, end of the matter, era, extent, interlude, interim, interval, period, tenancy, tenure, term associated concepts: time being of the essence, time certificate, time deposit, time fixed by agreement, time of absence …   Law dictionary

  • Time's Up! — jeu de société la première édition française de Time s Up! {{{licence}}} Auteur Peter Sarrett Éditeur …   Wikipédia en Français


Поделиться ссылкой на выделенное

Прямая ссылка:
Нажмите правой клавишей мыши и выберите «Копировать ссылку»