<s>
Unix	B-Operating_System
time	I-Operating_System
is	O
a	O
date	O
and	O
time	O
representation	O
widely	O
used	O
in	O
computing	O
.	O
</s>
<s>
It	O
measures	O
time	O
by	O
the	O
number	O
of	O
seconds	O
that	O
have	O
elapsed	O
since	O
00:00:00	O
UTC	O
on	O
1	B-Operating_System
January	I-Operating_System
1970	I-Operating_System
,	O
the	O
beginning	O
of	O
the	O
Unix	B-Operating_System
epoch	I-Operating_System
,	O
without	O
adjustments	O
made	O
due	O
to	O
leap	O
seconds	O
.	O
</s>
<s>
Unix	B-Operating_System
time	I-Operating_System
originated	O
as	O
the	O
system	B-Operating_System
time	I-Operating_System
of	O
Unix	B-Application
operating	I-Application
systems	I-Application
.	O
</s>
<s>
It	O
has	O
come	O
to	O
be	O
widely	O
used	O
in	O
other	O
computer	B-General_Concept
operating	I-General_Concept
systems	I-General_Concept
,	O
file	B-Application
systems	I-Application
,	O
programming	O
languages	O
,	O
and	O
databases	B-Application
.	O
</s>
<s>
Two	O
layers	O
of	O
encoding	O
make	O
up	O
Unix	B-Operating_System
time	I-Operating_System
.	O
</s>
<s>
The	O
first	O
layer	O
encodes	O
a	O
point	O
in	O
time	O
as	O
a	O
scalar	O
real	O
number	O
which	O
represents	O
the	O
number	O
of	O
seconds	O
that	O
have	O
passed	O
since	O
00:00:00UTC	O
on	O
Thursday	O
,	O
1	B-Operating_System
January	I-Operating_System
1970	I-Operating_System
.	O
</s>
<s>
The	O
second	O
layer	O
encodes	O
that	O
number	O
as	O
a	O
sequence	O
of	O
bits	O
or	O
decimal	B-Application
digits	O
.	O
</s>
<s>
Unix	B-Operating_System
time	I-Operating_System
differs	O
from	O
both	O
Coordinated	O
Universal	O
Time	O
(	O
UTC	O
)	O
and	O
International	O
Atomic	O
Time	O
(	O
TAI	O
)	O
in	O
its	O
handling	O
of	O
leap	O
seconds	O
.	O
</s>
<s>
In	O
Unix	B-Operating_System
time	I-Operating_System
,	O
every	O
day	O
contains	O
exactly	O
seconds	O
but	O
leap	O
seconds	O
are	O
accounted	O
for	O
.	O
</s>
<s>
Unix	B-Operating_System
time	I-Operating_System
is	O
a	O
single	O
signed	O
number	O
that	O
increments	O
every	O
second	O
,	O
which	O
makes	O
it	O
easier	O
for	O
computers	O
to	O
store	O
and	O
manipulate	O
than	O
conventional	O
date	O
systems	O
.	O
</s>
<s>
The	O
Unix	B-Operating_System
epoch	I-Operating_System
is	O
the	O
time	O
00:00:00UTC	O
on	O
1	B-Operating_System
January	I-Operating_System
1970	I-Operating_System
.	O
</s>
<s>
For	O
brevity	O
,	O
the	O
remainder	O
of	O
this	O
section	O
uses	O
ISO	O
8601	O
date	O
and	O
time	O
format	O
,	O
in	O
which	O
the	O
Unix	B-Operating_System
epoch	I-Operating_System
is	O
1970-01-01T00:00:00Z	O
.	O
</s>
<s>
The	O
Unix	B-Operating_System
time	I-Operating_System
number	O
is	O
zero	O
at	O
the	O
Unix	B-Operating_System
epoch	I-Operating_System
and	O
increases	O
by	O
exactly	O
per	O
day	O
since	O
the	O
epoch	O
.	O
</s>
<s>
Thus	O
2004-09-16T00:00:00Z	O
,	O
days	O
after	O
the	O
epoch	O
,	O
is	O
represented	O
by	O
the	O
Unix	B-Operating_System
time	I-Operating_System
number	O
×	O
=	O
.	O
</s>
<s>
This	O
can	O
be	O
extended	O
backwards	O
from	O
the	O
epoch	O
too	O
,	O
using	O
negative	O
numbers	O
;	O
thus	O
1957-10-04T00:00:00Z	O
,	O
days	O
before	O
the	O
epoch	O
,	O
is	O
represented	O
by	O
the	O
Unix	B-Operating_System
time	I-Operating_System
number	O
×	O
=	O
.	O
</s>
<s>
Sometimes	O
,	O
Unix	B-Operating_System
time	I-Operating_System
is	O
mistakenly	O
referred	O
to	O
as	O
Epoch	B-Operating_System
time	I-Operating_System
,	O
because	O
Unix	B-Operating_System
time	I-Operating_System
is	O
based	O
on	O
an	O
epoch	O
and	O
because	O
of	O
a	O
common	O
misunderstanding	O
that	O
the	O
Unix	B-Operating_System
epoch	I-Operating_System
is	O
the	O
only	O
epoch	O
(	O
often	O
called	O
"	O
the	O
Epoch	O
"	O
)	O
.	O
</s>
<s>
The	O
above	O
scheme	O
means	O
that	O
on	O
a	O
normal	O
UTC	O
day	O
,	O
which	O
has	O
a	O
duration	O
of	O
seconds	O
,	O
the	O
Unix	B-Operating_System
time	I-Operating_System
number	O
changes	O
in	O
a	O
continuous	O
manner	O
across	O
midnight	O
.	O
</s>
<s>
When	O
a	O
leap	O
second	O
occurs	O
,	O
the	O
UTC	O
day	O
is	O
not	O
exactly	O
seconds	O
long	O
and	O
the	O
Unix	B-Operating_System
time	I-Operating_System
number	O
(	O
which	O
always	O
increases	O
by	O
exactly	O
each	O
day	O
)	O
experiences	O
a	O
discontinuity	O
.	O
</s>
<s>
No	O
negative	O
leap	O
second	O
has	O
ever	O
been	O
declared	O
,	O
but	O
if	O
one	O
were	O
to	O
be	O
,	O
then	O
at	O
the	O
end	O
of	O
a	O
day	O
with	O
a	O
negative	O
leap	O
second	O
,	O
the	O
Unix	B-Operating_System
time	I-Operating_System
number	O
would	O
jump	O
up	O
by	O
1	O
to	O
the	O
start	O
of	O
the	O
next	O
day	O
.	O
</s>
<s>
During	O
a	O
positive	O
leap	O
second	O
at	O
the	O
end	O
of	O
a	O
day	O
,	O
which	O
occurs	O
about	O
every	O
year	O
and	O
a	O
half	O
on	O
average	O
,	O
the	O
Unix	B-Operating_System
time	I-Operating_System
number	O
increases	O
continuously	O
into	O
the	O
next	O
day	O
during	O
the	O
leap	O
second	O
and	O
then	O
at	O
the	O
end	O
of	O
the	O
leap	O
second	O
jumps	O
back	O
by	O
1	O
(	O
returning	O
to	O
the	O
start	O
of	O
the	O
next	O
day	O
)	O
.	O
</s>
<s>
Unix	B-Operating_System
time	I-Operating_System
numbers	O
are	O
repeated	O
in	O
the	O
second	O
immediately	O
following	O
a	O
positive	O
leap	O
second	O
.	O
</s>
<s>
The	O
Unix	B-Operating_System
time	I-Operating_System
number	O
is	O
thus	O
ambiguous	O
:	O
it	O
can	O
refer	O
either	O
to	O
start	O
of	O
the	O
leap	O
second	O
(	O
2016-12-31	O
23:59:60	O
)	O
or	O
the	O
end	O
of	O
it	O
,	O
one	O
second	O
later	O
(	O
2017-01-01	O
00:00:00	O
)	O
.	O
</s>
<s>
In	O
the	O
theoretical	O
case	O
when	O
a	O
negative	O
leap	O
second	O
occurs	O
,	O
no	O
ambiguity	O
is	O
caused	O
,	O
but	O
instead	O
there	O
is	O
a	O
range	O
of	O
Unix	B-Operating_System
time	I-Operating_System
numbers	O
that	O
do	O
not	O
refer	O
to	O
any	O
point	O
in	O
UTC	O
time	O
at	O
all	O
.	O
</s>
<s>
A	O
Unix	B-Application
clock	O
is	O
often	O
implemented	O
with	O
a	O
different	O
type	O
of	O
positive	O
leap	O
second	O
handling	O
associated	O
with	O
the	O
Network	B-Protocol
Time	I-Protocol
Protocol	I-Protocol
(	O
NTP	O
)	O
.	O
</s>
<s>
When	O
dealing	O
with	O
periods	O
that	O
do	O
not	O
encompass	O
a	O
UTC	O
leap	O
second	O
,	O
the	O
difference	O
between	O
two	O
Unix	B-Operating_System
time	I-Operating_System
numbers	O
is	O
equal	O
to	O
the	O
duration	O
in	O
seconds	O
of	O
the	O
period	O
between	O
the	O
corresponding	O
points	O
in	O
time	O
.	O
</s>
<s>
In	O
applications	O
where	O
this	O
level	O
of	O
accuracy	O
is	O
required	O
,	O
it	O
is	O
necessary	O
to	O
consult	O
a	O
table	O
of	O
leap	O
seconds	O
when	O
dealing	O
with	O
Unix	B-Operating_System
times	I-Operating_System
,	O
and	O
it	O
is	O
often	O
preferable	O
to	O
use	O
a	O
different	O
time	O
encoding	O
that	O
does	O
not	O
suffer	O
from	O
this	O
problem	O
.	O
</s>
<s>
A	O
Unix	B-Operating_System
time	I-Operating_System
number	O
is	O
easily	O
converted	O
back	O
into	O
a	O
UTC	O
time	O
by	O
taking	O
the	O
quotient	O
and	O
modulus	O
of	O
the	O
Unix	B-Operating_System
time	I-Operating_System
number	O
,	O
modulo	O
.	O
</s>
<s>
If	O
given	O
a	O
Unix	B-Operating_System
time	I-Operating_System
number	O
that	O
is	O
ambiguous	O
due	O
to	O
a	O
positive	O
leap	O
second	O
,	O
this	O
algorithm	O
interprets	O
it	O
as	O
the	O
time	O
just	O
after	O
midnight	O
.	O
</s>
<s>
If	O
given	O
a	O
Unix	B-Operating_System
time	I-Operating_System
number	O
that	O
is	O
invalid	O
due	O
to	O
a	O
negative	O
leap	O
second	O
,	O
it	O
generates	O
an	O
equally	O
invalid	O
UTC	O
time	O
.	O
</s>
<s>
Commonly	O
a	O
Mills-style	O
Unix	B-Application
clock	O
is	O
implemented	O
with	O
leap	O
second	O
handling	O
not	O
synchronous	O
with	O
the	O
change	O
of	O
the	O
Unix	B-Operating_System
time	I-Operating_System
number	O
.	O
</s>
<s>
In	O
this	O
type	O
of	O
system	O
the	O
Unix	B-Operating_System
time	I-Operating_System
number	O
violates	O
POSIX	O
around	O
both	O
types	O
of	O
leap	O
second	O
.	O
</s>
<s>
Collecting	O
the	O
leap	O
second	O
state	O
variable	O
along	O
with	O
the	O
time	O
number	O
allows	O
for	O
unambiguous	O
decoding	O
,	O
so	O
the	O
correct	O
POSIX	B-Operating_System
time	I-Operating_System
number	O
can	O
be	O
generated	O
if	O
desired	O
,	O
or	O
the	O
full	O
UTC	O
time	O
can	O
be	O
stored	O
in	O
a	O
more	O
suitable	O
format	O
.	O
</s>
<s>
The	O
decoding	O
logic	O
required	O
to	O
cope	O
with	O
this	O
style	O
of	O
Unix	B-Application
clock	O
would	O
also	O
correctly	O
decode	O
a	O
hypothetical	O
POSIX-conforming	O
clock	O
using	O
the	O
same	O
interface	O
.	O
</s>
<s>
This	O
is	O
probably	O
the	O
best	O
way	O
to	O
express	O
UTC	O
time	O
in	O
Unix	B-Application
clock	O
form	O
,	O
via	O
a	O
Unix	B-Application
interface	O
,	O
when	O
the	O
underlying	O
clock	O
is	O
fundamentally	O
untroubled	O
by	O
leap	O
seconds	O
.	O
</s>
<s>
Another	O
,	O
much	O
rarer	O
,	O
non-conforming	O
variant	O
of	O
Unix	B-Operating_System
time	I-Operating_System
keeping	O
involves	O
incrementing	O
the	O
value	O
for	O
all	O
seconds	O
,	O
including	O
leap	O
seconds	O
;	O
some	O
Linux	B-Application
systems	O
are	O
configured	O
this	O
way	O
.	O
</s>
<s>
In	O
these	O
systems	O
it	O
is	O
necessary	O
to	O
consult	O
a	O
table	O
of	O
leap	O
seconds	O
to	O
correctly	O
convert	O
between	O
UTC	O
and	O
the	O
pseudo-Unix-time	O
representation	O
.	O
</s>
<s>
This	O
system	O
,	O
despite	O
its	O
superficial	O
resemblance	O
,	O
is	O
not	O
Unix	B-Operating_System
time	I-Operating_System
.	O
</s>
<s>
It	O
encodes	O
times	O
with	O
values	O
that	O
differ	O
by	O
several	O
seconds	O
from	O
the	O
POSIX	B-Operating_System
time	I-Operating_System
values	O
.	O
</s>
<s>
A	O
Unix	B-Operating_System
time	I-Operating_System
number	O
can	O
be	O
represented	O
in	O
any	O
form	O
capable	O
of	O
representing	O
numbers	O
.	O
</s>
<s>
In	O
some	O
applications	O
the	O
number	O
is	O
simply	O
represented	O
textually	O
as	O
a	O
string	O
of	O
decimal	B-Application
digits	O
,	O
raising	O
only	O
trivial	O
additional	O
problems	O
.	O
</s>
<s>
However	O
,	O
certain	O
binary	O
representations	O
of	O
Unix	B-Operating_System
times	I-Operating_System
are	O
particularly	O
significant	O
.	O
</s>
<s>
The	O
Unix	B-Application
time_t	O
data	O
type	O
that	O
represents	O
a	O
point	O
in	O
time	O
is	O
,	O
on	O
many	O
platforms	O
,	O
a	O
signed	O
integer	O
,	O
traditionally	O
of	O
32bits	O
(	O
but	O
see	O
below	O
)	O
,	O
directly	O
encoding	O
the	O
Unix	B-Operating_System
time	I-Operating_System
number	O
as	O
described	O
in	O
the	O
preceding	O
section	O
.	O
</s>
<s>
The	O
minimum	O
representable	O
date	O
is	O
Friday	O
1901-12-13	O
,	O
and	O
the	O
maximum	O
representable	O
date	O
is	O
Tuesday	O
2038-01-19	B-Application
.	O
</s>
<s>
One	O
second	O
after	O
03:14:07UTC	O
2038-01-19	B-Application
this	O
representation	O
will	O
overflow	B-Algorithm
in	O
what	O
is	O
known	O
as	O
the	O
year	B-Application
2038	I-Application
problem	I-Application
.	I-Application
</s>
<s>
In	O
some	O
newer	O
operating	B-General_Concept
systems	I-General_Concept
,	O
time_t	O
has	O
been	O
widened	O
to	O
64	B-Device
bits	I-Device
.	O
</s>
<s>
There	O
was	O
originally	O
some	O
controversy	O
over	O
whether	O
the	O
Unix	B-Application
time_t	O
should	O
be	O
signed	O
or	O
unsigned	O
.	O
</s>
<s>
If	O
unsigned	O
,	O
its	O
range	O
in	O
the	O
future	O
would	O
be	O
doubled	O
,	O
postponing	O
the	O
32-bit	O
overflow	B-Algorithm
(	O
by	O
68	O
years	O
)	O
.	O
</s>
<s>
The	O
software	O
development	O
platform	O
for	O
version	O
6	O
of	O
the	O
QNX	B-Operating_System
operating	B-General_Concept
system	I-General_Concept
has	O
an	O
unsigned	O
32-bit	O
time_t	O
,	O
though	O
older	O
releases	O
used	O
a	O
signed	O
type	O
.	O
</s>
<s>
The	O
POSIX	O
and	O
Open	B-Application
Group	I-Application
Unix	B-Application
specifications	O
include	O
the	B-Language
C	I-Language
standard	I-Language
library	I-Language
,	O
which	O
includes	O
the	O
time	O
types	O
and	O
functions	O
defined	O
in	O
the	O
<time.h>	O
header	O
file	O
.	O
</s>
<s>
Unix	B-Application
has	O
no	O
tradition	O
of	O
directly	O
representing	O
non-integer	O
Unix	B-Operating_System
time	I-Operating_System
numbers	O
as	O
binary	O
fractions	O
.	O
</s>
<s>
Instead	O
,	O
times	O
with	O
sub-second	O
precision	O
are	O
represented	O
using	O
composite	O
data	O
types	O
that	O
consist	O
of	O
two	O
integers	O
,	O
the	O
first	O
being	O
a	O
time_t	O
(	O
the	O
integral	O
part	O
of	O
the	O
Unix	B-Operating_System
time	I-Operating_System
)	O
,	O
and	O
the	O
second	O
being	O
the	O
fractional	O
part	O
of	O
the	O
time	O
number	O
in	O
millionths	O
(	O
in	O
struct	O
timeval	O
)	O
or	O
billionths	O
(	O
in	O
struct	O
timespec	O
)	O
.	O
</s>
<s>
These	O
structures	O
provide	O
a	O
decimal-based	O
fixed-point	O
data	O
format	O
,	O
which	O
is	O
useful	O
for	O
some	O
applications	O
,	O
and	O
trivial	O
to	O
convert	O
for	O
others	O
.	O
</s>
<s>
The	O
precise	O
definition	O
of	O
Unix	B-Operating_System
time	I-Operating_System
as	O
an	O
encoding	O
of	O
UTC	O
is	O
only	O
uncontroversial	O
when	O
applied	O
to	O
the	O
present	O
form	O
of	O
UTC	O
.	O
</s>
<s>
The	O
Unix	B-Operating_System
epoch	I-Operating_System
predating	O
the	O
start	O
of	O
this	O
form	O
of	O
UTC	O
does	O
not	O
affect	O
its	O
use	O
in	O
this	O
era	O
:	O
the	O
number	O
of	O
days	O
from	O
1	B-Operating_System
January	I-Operating_System
1970	I-Operating_System
(	O
the	O
Unix	B-Operating_System
epoch	I-Operating_System
)	O
to	O
1	O
January	O
1972	O
(	O
the	O
start	O
of	O
UTC	O
)	O
is	O
not	O
in	O
question	O
,	O
and	O
the	O
number	O
of	O
days	O
is	O
all	O
that	O
is	O
significant	O
to	O
Unix	B-Operating_System
time	I-Operating_System
.	O
</s>
<s>
The	O
meaning	O
of	O
Unix	B-Operating_System
time	I-Operating_System
values	O
below	O
(	O
i.e.	O
,	O
prior	O
to	O
1	O
January	O
1972	O
)	O
is	O
not	O
precisely	O
defined	O
.	O
</s>
<s>
The	O
basis	O
of	O
such	O
Unix	B-Operating_System
times	I-Operating_System
is	O
best	O
understood	O
to	O
be	O
an	O
unspecified	O
approximation	O
of	O
UTC	O
.	O
</s>
<s>
Unix	B-Operating_System
time	I-Operating_System
is	O
not	O
a	O
suitable	O
way	O
to	O
represent	O
times	O
prior	O
to	O
1972	O
in	O
applications	O
requiring	O
sub-second	O
precision	O
;	O
such	O
applications	O
must	O
,	O
at	O
least	O
,	O
define	O
which	O
form	O
of	O
UT	O
or	O
GMT	O
they	O
use	O
.	O
</s>
<s>
If	O
this	O
happens	O
,	O
it	O
is	O
likely	O
that	O
Unix	B-Operating_System
time	I-Operating_System
will	O
be	O
prospectively	O
defined	O
in	O
terms	O
of	O
this	O
new	O
time	O
scale	O
,	O
instead	O
of	O
UTC	O
.	O
</s>
<s>
Uncertainty	O
about	O
whether	O
this	O
will	O
occur	O
makes	O
prospective	O
Unix	B-Operating_System
time	I-Operating_System
no	O
less	O
predictable	O
than	O
it	O
already	O
is	O
:	O
if	O
UTC	O
were	O
simply	O
to	O
have	O
no	O
further	O
leap	O
seconds	O
the	O
result	O
would	O
be	O
the	O
same	O
.	O
</s>
<s>
The	O
earliest	O
versions	O
of	O
Unix	B-Operating_System
time	I-Operating_System
had	O
a	O
32-bit	O
integer	O
incrementing	O
at	O
a	O
rate	O
of	O
60Hz	O
,	O
which	O
was	O
the	O
rate	O
of	O
the	O
system	B-Operating_System
clock	I-Operating_System
on	O
the	O
hardware	O
of	O
the	O
early	O
Unix	B-Application
systems	I-Application
.	O
</s>
<s>
As	O
late	O
as	O
November	O
of	O
1971	O
,	O
Unix	B-Application
was	O
still	O
counting	O
time	O
in	O
60ths	O
of	O
a	O
second	O
since	O
an	O
epoch	O
of	O
1	O
January	O
1971	O
,	O
which	O
is	O
a	O
year	O
later	O
than	O
the	O
epoch	O
currently	O
used	O
.	O
</s>
<s>
This	O
timestamp	O
could	O
only	O
represent	O
a	O
range	O
of	O
about	O
2.5	O
years	O
,	O
forcing	O
the	O
epoch	O
and	O
units	O
counted	O
to	O
be	O
redefined	O
;	O
the	O
Third	O
Edition	O
UNIX	B-Application
manual	O
specifies	O
an	O
epoch	O
of	O
1	O
January	O
1972	O
.	O
</s>
<s>
Early	O
definitions	O
of	O
Unix	B-Operating_System
time	I-Operating_System
also	O
lacked	O
timezones	O
.	O
</s>
<s>
The	O
current	O
epoch	O
of	O
1	B-Operating_System
January	I-Operating_System
1970	I-Operating_System
00:00:00	O
UTC	O
was	O
selected	O
arbitrarily	O
by	O
Unix	B-Application
engineers	O
because	O
it	O
was	O
considered	O
a	O
convenient	O
date	O
to	O
work	O
with	O
.	O
</s>
<s>
The	O
precision	O
was	O
changed	O
to	O
count	O
in	O
seconds	O
in	O
order	O
to	O
avoid	O
short-term	O
overflow	B-Algorithm
.	O
</s>
<s>
The	O
POSIX	O
committee	O
considered	O
whether	O
Unix	B-Operating_System
time	I-Operating_System
should	O
remain	O
,	O
as	O
intended	O
,	O
a	O
linear	O
count	O
of	O
seconds	O
since	O
the	O
epoch	O
,	O
at	O
the	O
expense	O
of	O
complexity	O
in	O
conversions	O
with	O
civil	O
time	O
or	O
a	O
representation	O
of	O
civil	O
time	O
,	O
at	O
the	O
expense	O
of	O
inconsistency	O
around	O
leap	O
seconds	O
.	O
</s>
<s>
The	O
POSIX	O
committee	O
was	O
swayed	O
by	O
arguments	O
against	O
complexity	O
in	O
the	O
library	O
functions	O
,	O
and	O
firmly	O
defined	O
the	O
Unix	B-Operating_System
time	I-Operating_System
in	O
a	O
simple	O
manner	O
in	O
terms	O
of	O
the	O
elements	O
of	O
UTC	O
time	O
.	O
</s>
<s>
The	O
2001	O
edition	O
of	O
POSIX.1	O
rectified	O
the	O
faulty	O
leap	O
year	O
rule	O
in	O
the	O
definition	O
of	O
Unix	B-Operating_System
time	I-Operating_System
,	O
but	O
retained	O
the	O
essential	O
definition	O
of	O
Unix	B-Operating_System
time	I-Operating_System
as	O
an	O
encoding	O
of	O
UTC	O
rather	O
than	O
a	O
linear	O
time	O
scale	O
.	O
</s>
<s>
Since	O
the	O
mid-1990s	O
,	O
computer	O
clocks	O
have	O
been	O
routinely	O
set	O
with	O
sufficient	O
precision	O
for	O
this	O
to	O
matter	O
,	O
and	O
they	O
have	O
most	O
commonly	O
been	O
set	O
using	O
the	O
UTC-based	O
definition	O
of	O
Unix	B-Operating_System
time	I-Operating_System
.	O
</s>
<s>
This	O
has	O
resulted	O
in	O
considerable	O
complexity	O
in	O
Unix	B-Application
implementations	O
,	O
and	O
in	O
the	O
Network	B-Protocol
Time	I-Protocol
Protocol	I-Protocol
,	O
to	O
execute	O
steps	O
in	O
the	O
Unix	B-Operating_System
time	I-Operating_System
number	O
whenever	O
leap	O
seconds	O
occur	O
.	O
</s>
<s>
Unix	B-Operating_System
time	I-Operating_System
was	O
designed	O
to	O
encode	O
calendar	O
dates	O
and	O
times	O
in	O
a	O
compact	O
manner	O
intended	O
for	O
use	O
by	O
computers	O
internally	O
.	O
</s>
<s>
Unix	B-Operating_System
time	I-Operating_System
by	O
design	O
does	O
not	O
require	O
a	O
specific	O
size	O
for	O
the	O
storage	O
,	O
but	O
most	O
common	O
implementations	O
of	O
Unix	B-Operating_System
time	I-Operating_System
use	O
a	O
signed	O
integer	O
with	O
the	O
word	O
size	O
of	O
the	O
underlying	O
computer	O
.	O
</s>
<s>
As	O
the	O
majority	O
of	O
modern	O
computers	O
are	O
32-bit	O
or	O
64-bit	B-Device
,	O
and	O
a	O
large	O
number	O
of	O
programs	O
are	O
still	O
written	O
in	O
32-bit	O
compatibility	O
mode	O
,	O
this	O
means	O
that	O
many	O
programs	O
using	O
Unix	B-Operating_System
time	I-Operating_System
are	O
using	O
signed	O
32-bit	O
integer	O
fields	O
.	O
</s>
<s>
The	O
maximum	O
value	O
of	O
a	O
signed	O
32	O
bit	O
integer	O
is	O
2-1	O
,	O
and	O
the	O
minimum	O
value	O
is	O
-(2 )	O
,	O
making	O
it	O
impossible	O
to	O
represent	O
dates	O
before	O
December	O
13	O
,	O
1901	O
(	O
at	O
20:45:52	O
UTC	O
)	O
or	O
after	O
January	B-Application
19	I-Application
,	I-Application
2038	I-Application
(	O
at	O
03:14:07	O
UTC	O
)	O
.	O
</s>
<s>
The	O
early	O
cutoff	O
can	O
have	O
an	O
impact	O
on	O
databases	B-Application
that	O
are	O
storing	O
historical	O
information	O
;	O
in	O
some	O
databases	B-Application
where	O
32-bit	O
Unix	B-Operating_System
time	I-Operating_System
is	O
used	O
for	O
timestamps	O
,	O
it	O
may	O
be	O
necessary	O
to	O
store	O
time	O
in	O
a	O
different	O
form	O
of	O
field	O
,	O
such	O
as	O
a	O
string	O
,	O
to	O
represent	O
dates	O
before	O
1901	O
.	O
</s>
<s>
The	O
late	O
cutoff	O
is	O
known	O
as	O
the	O
Year	B-Application
2038	I-Application
problem	I-Application
and	O
has	O
the	O
potential	O
to	O
cause	O
issues	O
as	O
the	O
date	O
approaches	O
,	O
as	O
dates	O
beyond	O
the	O
2038	O
cutoff	O
would	O
wrap	O
back	O
around	O
to	O
the	O
start	O
of	O
the	O
representable	O
range	O
in	O
1901	O
.	O
</s>
<s>
64-bit	B-Device
storage	O
of	O
Unix	B-Operating_System
time	I-Operating_System
is	O
generally	O
assumed	O
not	O
to	O
have	O
issues	O
with	O
date	O
range	O
limitations	O
,	O
as	O
the	O
effective	O
range	O
of	O
dates	O
representable	O
with	O
Unix	B-Operating_System
time	I-Operating_System
stored	O
in	O
a	O
signed	O
64-bit	B-Device
integer	O
is	O
over	O
584	O
billion	O
years	O
,	O
or	O
around	O
42	O
times	O
larger	O
than	O
the	O
current	O
estimated	O
age	O
of	O
the	O
universe	O
.	O
</s>
<s>
Unix	B-Operating_System
time	I-Operating_System
is	O
not	O
the	O
only	O
standard	O
for	O
time	O
that	O
counts	O
away	O
from	O
an	O
epoch	O
.	O
</s>
<s>
On	O
Windows	B-Application
,	O
the	O
FILETIME	O
type	O
stores	O
time	O
as	O
a	O
count	O
of	O
100-nanosecond	O
intervals	O
that	O
have	O
elapsed	O
since	O
0:00	O
GMT	O
on	O
January	O
1	O
,	O
1601	O
;	O
it	O
is	O
used	O
to	O
store	O
time	O
stamps	O
for	O
files	O
,	O
and	O
is	O
used	O
in	O
some	O
protocols	O
used	O
primarily	O
,	O
but	O
not	O
exclusively	O
,	O
on	O
Windows	B-Application
computers	I-Application
,	O
such	O
as	O
the	O
Active	B-Protocol
Directory	I-Protocol
Time	O
Service}}	O
and	O
the	O
Server	B-Operating_System
Message	I-Operating_System
Block	I-Operating_System
protocols	O
.	O
</s>
<s>
The	O
Network	B-Protocol
Time	I-Protocol
Protocol	I-Protocol
used	O
to	O
coordinate	O
time	O
between	O
computers	O
uses	O
an	O
epoch	O
of	O
January	O
1	O
,	O
1900	O
,	O
counted	O
in	O
an	O
unsigned	O
32-bit	O
integer	O
for	O
seconds	O
and	O
another	O
unsigned	O
32-bit	O
integer	O
for	O
fractional	O
seconds	O
,	O
which	O
rolls	O
over	O
every	O
2	O
seconds	O
(	O
about	O
once	O
every	O
136	O
years	O
)	O
.	O
</s>
<s>
Unix	B-Application
enthusiasts	O
have	O
a	O
history	O
of	O
holding	O
"	O
time_t	O
parties	O
"	O
(	O
pronounced	O
"	O
time	O
tea	O
parties	O
"	O
)	O
to	O
celebrate	O
significant	O
values	O
of	O
the	O
Unix	B-Operating_System
time	I-Operating_System
number	O
.	O
</s>
<s>
As	O
the	O
use	O
of	O
Unix	B-Operating_System
time	I-Operating_System
has	O
spread	O
,	O
so	O
has	O
the	O
practice	O
of	O
celebrating	O
its	O
milestones	O
.	O
</s>
<s>
Usually	O
it	O
is	O
time	O
values	O
that	O
are	O
round	O
numbers	O
in	O
decimal	B-Application
that	O
are	O
celebrated	O
,	O
following	O
the	O
Unix	B-Application
convention	O
of	O
viewing	O
time_t	O
values	O
in	O
decimal	B-Application
.	O
</s>
<s>
The	O
events	O
that	O
these	O
celebrate	O
are	O
typically	O
described	O
as	O
"	O
N	O
seconds	O
since	O
the	O
Unix	B-Operating_System
epoch	I-Operating_System
"	O
,	O
but	O
this	O
is	O
inaccurate	O
;	O
as	O
discussed	O
above	O
,	O
due	O
to	O
the	O
handling	O
of	O
leap	O
seconds	O
in	O
Unix	B-Operating_System
time	I-Operating_System
the	O
number	O
of	O
seconds	O
elapsed	O
since	O
the	O
Unix	B-Operating_System
epoch	I-Operating_System
is	O
slightly	O
greater	O
than	O
the	O
Unix	B-Operating_System
time	I-Operating_System
number	O
for	O
times	O
later	O
than	O
the	O
epoch	O
.	O
</s>
<s>
At	O
18:36:57	O
UTC	O
on	O
Wednesday	O
,	O
17	O
October	O
1973	O
,	O
the	O
first	O
appearance	O
of	O
the	O
date	O
in	O
ISO	O
8601	O
format	O
within	O
the	O
digits	O
of	O
Unix	B-Operating_System
time	I-Operating_System
(	O
119731017	O
)	O
took	O
place	O
.	O
</s>
<s>
At	O
01:46:40	O
UTC	O
on	O
Sunday	O
,	O
9	O
September	O
2001	O
,	O
the	O
Unix	B-Application
billennium	O
(	O
Unix	B-Operating_System
time	I-Operating_System
number	O
)	O
was	O
celebrated	O
.	O
</s>
<s>
Affected	O
programs	O
included	O
the	O
popular	O
Usenet	B-Application
reader	O
KNode	O
and	O
e-mail	O
client	O
KMail	O
,	O
part	O
of	O
the	O
KDE	B-Application
desktop	O
environment	O
.	O
</s>
<s>
The	O
problem	O
also	O
affected	O
many	O
Filtrix	O
document-format	O
filters	O
provided	O
with	O
Linux	B-Application
versions	O
of	O
WordPerfect	B-Application
;	O
a	O
patch	O
was	O
created	O
by	O
the	O
user	O
community	O
to	O
solve	O
this	O
problem	O
,	O
since	O
Corel	O
no	O
longer	O
sold	O
or	O
supported	O
that	O
version	O
of	O
the	O
program	O
.	O
</s>
<s>
At	O
23:31:30	O
UTC	O
on	O
Friday	O
,	O
13	O
February	O
2009	O
,	O
the	O
decimal	B-Application
representation	O
of	O
Unix	B-Operating_System
time	I-Operating_System
reached	O
seconds	O
.	O
</s>
<s>
Google	B-Application
celebrated	O
this	O
with	O
a	O
Google	B-Application
doodle	O
.	O
</s>
<s>
At	O
09:06:49	O
UTC	O
on	O
Friday	O
,	O
16	O
June	O
2034	O
,	O
the	O
decimal	B-Application
digits	O
of	O
the	O
Unix	B-Operating_System
time	I-Operating_System
value	O
will	O
match	O
the	O
current	O
year	O
,	O
month	O
,	O
date	O
and	O
hour	O
(	O
2034061609	O
)	O
.	O
</s>
<s>
At	O
03:14:08	O
UTC	O
on	O
Tuesday	O
,	O
19	O
January	O
2038	O
,	O
32-bit	O
versions	O
of	O
the	O
Unix	B-Operating_System
timestamp	I-Operating_System
will	O
cease	O
to	O
work	O
,	O
as	O
it	O
will	O
overflow	B-Algorithm
the	O
largest	O
value	O
that	O
can	O
be	O
held	O
in	O
a	O
signed	O
32-bit	O
number	O
(	O
or	O
)	O
.	O
</s>
<s>
This	O
is	O
referred	O
to	O
as	O
the	O
Year	B-Application
2038	I-Application
problem	I-Application
.	I-Application
</s>
<s>
At	O
06:28:15	O
UTC	O
on	O
Sunday	O
,	O
7	O
February	O
2106	O
,	O
Unix	B-Operating_System
time	I-Operating_System
will	O
reach	O
or	O
seconds	O
,	O
which	O
,	O
for	O
systems	O
that	O
hold	O
the	O
time	O
on	O
32-bit	O
unsigned	O
integers	O
,	O
is	O
the	O
maximum	O
attainable	O
.	O
</s>
<s>
Other	O
systems	O
may	O
experience	O
an	O
overflow	B-Algorithm
error	O
with	O
unpredictable	O
outcomes	O
.	O
</s>
<s>
At	O
15:30:08	O
UTC	O
on	O
Sunday	O
,	O
4	O
December	O
,	O
Unix	B-Operating_System
time	I-Operating_System
will	O
overflow	B-Algorithm
the	O
largest	O
value	O
that	O
can	O
be	O
held	O
in	O
a	O
signed	O
64-bit	B-Device
number	O
.	O
</s>
<s>
Vernor	O
Vinge	O
's	O
novel	O
A	O
Deepness	O
in	O
the	O
Sky	O
describes	O
a	O
spacefaring	O
trading	O
civilization	O
thousands	O
of	O
years	O
in	O
the	O
future	O
that	O
still	O
uses	O
the	O
Unix	B-Operating_System
epoch	I-Operating_System
.	O
</s>
<s>
The	O
"	O
programmer-archaeologist	O
"	O
responsible	O
for	O
finding	O
and	O
maintaining	O
usable	O
code	O
in	O
mature	O
computer	O
systems	O
first	O
believes	O
that	O
the	O
epoch	O
refers	O
to	O
the	O
time	O
when	O
man	O
first	O
walked	O
on	O
the	O
Moon	O
,	O
but	O
then	O
realizes	O
that	O
it	O
is	O
"	O
the	O
0-second	O
of	O
one	O
of	O
humankind	O
's	O
first	O
computer	B-General_Concept
operating	I-General_Concept
systems	I-General_Concept
"	O
.	O
</s>
