Message45259
Logged In: YES
user_id=38388
From the DB API specs:
TimeFromTicks(ticks)
This function constructs an object holding a
time value
from the given ticks value (number of seconds
since the
epoch; see the documentation of the standard
Python time
module for details).
The reason for this having this API is to be able to construct
an object suitable for passing to the database given a Unix
ticks value. Since the ticks value contains both a date and
a time part and most databases have a special column type
for time value, we need two constructor APIs, one to extract
just the date part and one for the time part.
Here's the mxDateTime implementation for reference:
def TimeFromTicks(ticks,
# Locals:
DateTimeDelta=DateTimeDelta,localtime=_time.localtime):
""" TimeFromTicks(ticks)
Constructs a DateTimeDelta instance pointing to the
local time
indicated by the given ticks value. The date part is
ignored.
"""
return apply(DateTimeDelta, (0,) + localtime(ticks)[3:6])
|
|
Date |
User |
Action |
Args |
2007-08-23 15:31:56 | admin | link | issue876130 messages |
2007-08-23 15:31:56 | admin | create | |
|