tru64-unix-managers (formerly alpha-osf-managers) (1994-2012)
 help / color / mirror / Atom feed
* SUMMARY: localtime(3) function output not Y2K compatible?
@ 1999-03-13 18:45 Salvador Ramirez
  0 siblings, 0 replies; only message in thread
From: Salvador Ramirez @ 1999-03-13 18:45 UTC (permalink / raw)
  To: tru64-unix-managers

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@forte.com>
Peter Chapin <pchapin@twilight.vtc.vsc.edu>
Alan Rollow <alan@nabeth.cxo.dec.com>
Matt Moore <moorem@storm.bucks.edu>
John Hascall <john@iastate.edu>
Peter Olson <PETER@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@profc.udec.cl

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~1999-03-13 18:45 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
1999-03-13 18:45 SUMMARY: localtime(3) function output not Y2K compatible? Salvador Ramirez

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox