Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 18 Jan 2000 10:33:22 -0800 (PST)
From:      Jin Guojun (FTG staff) <jin@gracie.lbl.gov>
To:        FreeBSD-gnats-submit@freebsd.org
Subject:   misc/16182: Y#K of tm_year returned by localtime()
Message-ID:  <200001181833.KAA62614@gracie.lbl.gov>

next in thread | raw e-mail | index | archive | help


>Number:         16182
>Category:       misc
>Synopsis:       Y#K of tm_year returned by localtime()
>Confidential:   no
>Severity:       serious
>Priority:       medium
>Responsible:    freebsd-bugs
>State:          open
>Quarter:        
>Keywords:       
>Date-Required:
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Tue Jan 18 10:40:01 PST 2000
>Closed-Date:
>Last-Modified:
>Originator:     Jin Guojun (FTG staff)
>Release:        FreeBSD 3.4-20000104-STABLE i386
>Organization:
>Environment:

	All FreeBSD Releases

>Description:

% ll Makefile
-rw-r--r--  1 jin  2294 Jan 18 09:59 Makefile

	stat(file_name, &f_stat);
	ftm = localtime(&f_stat.st_mtime);

(xxgdb) print *ftm
$3 = {
  tm_sec = 22, 
  tm_min = 44, 
  tm_hour = 9, 
  tm_mday = 18, 
  tm_mon = 0, 
  tm_year = 100, 
  tm_wday = 2, 
  tm_yday = 17, 
  tm_isdst = 0, 
  tm_gmtoff = -28800, 
  tm_zone = 0x20158f30 "PST"
}

>How-To-Repeat:

	

>Fix:
	
	Question:
	Shall we set the tm_year value to four digits by adding 1900?
	or Is the user resposible to add 1900 to the tm_year in program?


>Release-Note:
>Audit-Trail:
>Unformatted:


To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-bugs" in the body of the message




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200001181833.KAA62614>