This is the mail archive of the
newlib@sourceware.org
mailing list for the newlib project.
mktime()
- From: Steven Abner <pheonix at zoomtown dot com>
- To: newlib at sourceware dot org
- Date: Sat, 13 Aug 2011 06:35:49 -0400
- Subject: mktime()
- Authentication-results: ecout2 smtp.mail=pheonix@zoomtown.com; spf=unknown
- Authentication-results: ecout2 smtp.user=pheonix@zoomtown.com; auth=pass (LOGIN)
Good day,
Running some tests and found an omission?
In the mktime.c file, the function "validate_structure", it appears (to me) that the month test
might be incomplete?
"if (tim_p->tm_mon > 11)"
should it possibly be:
"if (tim_p->tm_mon > 11 || tim_p->tm_mon < 0)"
And this probably should be second thread?? but I tried using the environment variable
"TZ=GMT0" and I get tm_isdst = -1 when passing -1 in. Not sure, in this case, if user
should be setting to 0?. It could also be that I screwed up on porting newlib code for testing
purposes?
Cheers
Steve