SUMMARY: localtime(3) function output not Y2K compatible?

From: Salvador Ramirez <sram_at_profc.udec.CL>
Date: Sat, 13 Mar 1999 15:45:27 -0300 (EST)

My question was about the output of localtime(3) function which on the
field tm_year of the tm struct (defined in time.h) it return (at this
time) 99 instead of 1999.
What happens there is that the localtime(3) function return the year
substracted of 1900, so the you should add 1900 to tm_year in order
to get a complete year description. For example in the year 2003 you
will get 103 and so on..

Thanks to:

Peter Prymmer <pvhp_at_forte.com>
Peter Chapin <pchapin_at_twilight.vtc.vsc.edu>
Alan Rollow <alan_at_nabeth.cxo.dec.com>
Matt Moore <moorem_at_storm.bucks.edu>
John Hascall <john_at_iastate.edu>
Peter Olson <PETER_at_delphi.com>

---sram
               If God does not exist, it would be necessary
                         to invent him --Voltaire
Salvador Ramirez Flandes PROFC, Universidad de Concepcion, CHILE
http://www.profc.udec.cl/~sram mailto:sram_at_profc.udec.cl
Received on Sat Mar 13 1999 - 18:43:23 NZDT

This archive was generated by hypermail 2.4.0 : Wed Nov 08 2023 - 11:53:39 NZDT