Thread Datestamp in Sekunden umwandeln: seit Epochenbegin (4 answers)
Opened by Froschpopo at 2004-08-08 13:53

tomlong
 2004-08-08 15:30
#85578 #85578
User since
2003-08-04
93 Artikel
BenutzerIn
[default_avatar]
@strat ... mit den Monaten ist richtig, kann im ersten Moment zu Verwirrungen bei ner Umwandlung von dem Format bringen:
Sun Aug 8 13:10:10 2004

aber bei den Jahren kann man etwas relaxter an die Sache gehen, denn:
Quote
o Years greater than 999 are interpreted as being the
actual year, rather than the offset from 1900. Thus,
1963 would indicate the year Martin Luther King won
the Nobel prize, not the year 2863.

o Years in the range 100..999 are interpreted as offset
from 1900, so that 112 indicates 2012. This rule also
applies to years less than zero (but see note below
regarding date range).

o Years in the range 0..99 are interpreted as shorthand
for years in the rolling "current century," defined as
50 years on either side of the current year. Thus,
today, in 1999, 0 would refer to 2000, and 45 to 2045,
but 55 would refer to 1955. Twenty years from now, 55
would instead refer to 2055. This is messy, but
matches the way people currently think about two digit
dates. Whenever possible, use an absolute four digit
year instead.
Live long and prosper!
42;

View full thread Datestamp in Sekunden umwandeln: seit Epochenbegin