[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[gnue] r7687 - in trunk/gnue-common/src/datasources: . drivers/DBSIG2
From: |
johannes |
Subject: |
[gnue] r7687 - in trunk/gnue-common/src/datasources: . drivers/DBSIG2 |
Date: |
Wed, 6 Jul 2005 08:05:08 -0500 (CDT) |
Author: johannes
Date: 2005-07-06 08:05:06 -0500 (Wed, 06 Jul 2005)
New Revision: 7687
Modified:
trunk/gnue-common/src/datasources/drivers/DBSIG2/Connection.py
trunk/gnue-common/src/datasources/readgsd.py
Log:
Pass fractional seconds to the dbdriver as they are defined
Modified: trunk/gnue-common/src/datasources/drivers/DBSIG2/Connection.py
===================================================================
--- trunk/gnue-common/src/datasources/drivers/DBSIG2/Connection.py
2005-07-05 18:23:28 UTC (rev 7686)
+++ trunk/gnue-common/src/datasources/drivers/DBSIG2/Connection.py
2005-07-06 13:05:06 UTC (rev 7687)
@@ -465,7 +465,7 @@
returns: a time object created by the driver's Time constructor
"""
- psec = secs + msec / 1000000
+ psec = second + msec / 1000000
if self._std_datetime_:
return self._driver.Time (hour, minute, second, fsec)
Modified: trunk/gnue-common/src/datasources/readgsd.py
===================================================================
--- trunk/gnue-common/src/datasources/readgsd.py 2005-07-05 18:23:28 UTC
(rev 7686)
+++ trunk/gnue-common/src/datasources/readgsd.py 2005-07-06 13:05:06 UTC
(rev 7687)
@@ -654,7 +654,7 @@
# Adding the fractional part of seconds to the time instance, renders
# all records as 'allways changed' since there's no driver handling
# such times properly.
- micro = int (("%s" % (val.second - int (val.second))) [2:8])
+ micro = int ((val.second - int (val.second)) * 1000000)
return datetime.time (val.hour, val.minute, int (val.second), micro)
except ValueError:
@@ -664,7 +664,7 @@
try:
val = mx.DateTime.ISO.ParseDateTime (contents.strip ())
# Fractional part of seconds is problematic
- micro = int (("%s" % (val.second - int (val.second))) [2:8])
+ micro = int ((val.second - int (val.second)) * 1000000)
return datetime.datetime (val.year, val.month, val.day, val.hour,
val.minute, int (val.second), micro)
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [gnue] r7687 - in trunk/gnue-common/src/datasources: . drivers/DBSIG2,
johannes <=