Skip to content
Tcl Source Code View Ticket
Login

View Ticket

Small patch for tclWintime.c (Borland)

Closed473243ffffffffffffffffffffffffffffffffffCreated 25 years agoUpdated 19 years ago
Descriptionplain2001-10-20 20:15:15
Hello,
in the function TclpGetDate (tclwinTime.c) 'localtime' is called. Now, for certain settings 'localtime' 
returns a null pointer.
This is not a real world problem and only shows up in the test suite, causing test winTime-1.2 
{TclpGetDate} to produce a GP.

I changed the code to test for this behaviour and append a diff file.

Best regards,
Helmut
nobodyplain2001-10-22 20:47:33
Logged In: NO 

The diff file apparently did not make it to SF. Since it's only a couple of lines, I'll copy it here. Hope this 
works.
Helmut

*** tclwintime.cSat Oct 20 19:18:50 2001
--- tclwintime.corgThu Sep 06 11:48:44 2001
***************
*** 465,479 ****
      */
  
      if (*tp >= 0) {
- #ifndef __BORLANDC__
          return localtime(tp);
- #else
-         /* Borland manages to return 0 for illegal times */
-         /* so in this case we fall thru and do our own handling */
-         tmPtr = localtime(tp);
-         if ( tmPtr )
-              return tmPtr;
- #endif
     }
  
     time = *tp - _timezone;
--- 465,471 ----
hobbs Pending ticket [473243ffff]. [History diff]2008-03-13 03:00:29
sf-robotplain2008-03-27 09:20:35
Logged In: YES 
user_id=1312539
Originator: NO

This Tracker item was closed automatically by the system. It was
previously set to a Pending status, and the original submitter
did not respond within 14 days (the time period specified by
the administrator of this Tracker).
Log in (anonymous is fine) to add a comment.