Path: utzoo!attcan!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!wuarchive!csus.edu!ucdavis!csusac!jetfuel From: jetfuel@csusac.csus.edu (Dave Jenks) Newsgroups: comp.unix.programmer Subject: Re: What does the value returned by st_mtime in the stat structure mean? Summary: stat(2) Keywords: stat Message-ID: <1990Dec21.052847.16202@csusac.csus.edu> Date: 21 Dec 90 05:28:47 GMT References: <1990Dec21.041634.12760@monu6.cc.monash.edu.au> Reply-To: jetfuel@csusac.UUCP (Dave Jenks) Distribution: na Organization: California State University, Sacramento Lines: 22 In article <1990Dec21.041634.12760@monu6.cc.monash.edu.au> vac269k@monu6.cc.monash.edu.au (vacation) writes: > >In my code I have the following lines: > > stat (filename,&statbuf); > > printf ("%ld",statbuf.st_mtime); > >This prints out a number like 661742557 for the time the contents >of the file were last modified. >What does this number mean and how would I convert to more >intelligible format (such as day/month/year hour:minute) if >possible ? This is the number of seconds since 00:00:00 GMT Jan 1 1970. To convert it to something `meaningful', such as the ASCII string in my previous sentence, use ctime(3). -- ======================================================================= "Pro is to con, as progress is to Congress..." >>-@@-> Dave Jenks {uunet | ucbvax!ucdavis}!csusac!jetfuel =======================================================================