tru64-unix-managers (formerly alpha-osf-managers) (1994-2012)
 help / color / mirror / Atom feed
From: Salvador Ramirez <sram () profc ! udec ! CL>
To: tru64-unix-managers
Subject: SUMMARY: localtime(3) function output not Y2K compatible?
Date: Sat, 13 Mar 1999 18:45:27 +0000	[thread overview]
Message-ID: <96079038515667.tru64-unix-managers.marc@archive.invalid> (raw)

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

                 reply	other threads:[~1999-03-13 18:45 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed
read-only archive

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