tech-userlevel archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: mktime(3) return value



> the rather absurd value of tms.tm_year

It is not absurd. It is a -1, counting from 1900, so it
means 1899 -- 71 years before the Unix epoch.
Your program gives -2240614800 for me. Just a check:
$ bc -l
2240614800/60/60/24/365.2425
71.00225649169159302837

So, at least on -current, with 64-bit time_t, it looks OK.
With 32-bit time_t, I'd expect an error.

best regards
Matthias



------------------------------------------------------------------------------------------------
------------------------------------------------------------------------------------------------
Forschungszentrum Juelich GmbH
52425 Juelich
Sitz der Gesellschaft: Juelich
Eingetragen im Handelsregister des Amtsgerichts Dueren Nr. HR B 3498
Vorsitzender des Aufsichtsrats: MinDirig Dr. Karl Eugen Huthmacher
Geschaeftsfuehrung: Prof. Dr. Achim Bachem (Vorsitzender),
Dr. Ulrich Krafft (stellv. Vorsitzender), Prof. Dr.-Ing. Harald Bolt,
Prof. Dr. Sebastian M. Schmidt
------------------------------------------------------------------------------------------------
------------------------------------------------------------------------------------------------


Home | Main Index | Thread Index | Old Index