TIP: Click on subject to list as thread! ANSI
echo: os2prog
to: Chris Mcbrien
from: CHARLOTT(RPLYLER)
date: 1994-07-28 11:57:02
subject: Compiler Bug

Ref:     Append at 15:09:03 on 94/07/28 GMT (by IBMNET at TOROVM1)


Chris Mcbrien said to All:

>When calling the standard C function LocalTime, I have noticed
>that the structure field StuctName->tm_mon contains a value one
>less than the correct month.

To quote from the C/Set 2 online reference:
---------------------------------

The fields of the tm structure include:

Field            Value Stored
tm_sec           Seconds (0-61)
tm_min           Minutes (0-59)
tm_hour          Hours (0-23)
tm_mday          Day of month (1-31)
tm_mon           Month (0-11;  January = 0)  <<<<<<
tm_year          Year (current year minus 1900)
tm_wday          Day of week (0-6;  Sunday = 0)
tm_yday          Day of year (0-365;  January 1 = 0)
tm_isdst         Zero if Daylight Saving Time is not
in effect;  positive if Daylight
Saving Time is in effect; negative
if the information is not available.

---------------------------------

So, if tm_mon is 1 less than the actual month, you
are getting the right value.

Bob Plyler         IBM Document & Check Imaging Solutions

From:  RPLYLER at CHARLOTT

 


--- MAIL401/2 Gateway 1.0

* Origin: IBM Canada Gateway (1:12/2442.2001)
SEEN-BY: 12/2442 54/54 620/243 624/50 632/348 640/820 690/660 711/409 413 430
SEEN-BY: 711/807 808 809 934 942 712/353 623 713/888 800/1
@PATH: 12/2442 711/409 54/54 711/808 809 934

SOURCE: echomail via fidonet.ozzmosis.com

Email questions or comments to sysop@ipingthereforeiam.com
All parts of this website painstakingly hand-crafted in the U.S.A.!
IPTIA BBS/MUD/Terminal/Game Server List, © 2025 IPTIA Consulting™.