[Zope-Checkins] CVS: Products/DCOracle2/src - dco2.c:1.125

Matthew T. Kromer matt@zope.com
Thu, 21 Nov 2002 11:08:37 -0500


Update of /cvs-repository/Products/DCOracle2/src
In directory cvs.zope.org:/tmp/cvs-serv4581/src

Modified Files:
	dco2.c 
Log Message:
Add patch for date conversion for dates that are only times (so that int(T)
is not -1, but instead is the number of seconds since midnight).  Thanks Bo.


=== Products/DCOracle2/src/dco2.c 1.124 => 1.125 ===
--- Products/DCOracle2/src/dco2.c:1.124	Thu Nov 21 10:42:13 2002
+++ Products/DCOracle2/src/dco2.c	Thu Nov 21 11:08:36 2002
@@ -6967,6 +6967,9 @@
 #endif
 
 	dateobject->ticks = (long) mktime(&(dateobject->tm));
+	
+	if (dateobject->ticks == -1 && t == 0) 
+		dateobject->ticks = second + minute * 60 + hour * 3600;
 
 	sprintf(buf,"OracleDate(\"%04d-%02d-%02d %02d:%02d:%02d\")",
 		t, month, day, hour, minute, second);