This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author lemburg
Recipients
Date 2004-05-19.08:28:27
SpamBayes Score
Marked as misclassified
Message-id
In-reply-to
Content
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])
History
Date User Action Args
2007-08-23 15:31:56adminlinkissue876130 messages
2007-08-23 15:31:56admincreate