[Zope-dev] Finding the transaction timestamp in ZODB

Jonothan Farr jfarr@real.com
Wed, 12 Apr 2000 17:36:27 -0700


> Can enybody explain the format of the "byte serial" on the Data.fs? the
> FileStorage.py reads: "8 byte serial, type stamp that matches the
> transaction timestamp"

from ZODB.TimeStamp import TimeStamp

ts = apply(TimeStamp, _p_serial)
t = ts.timeTime()

Now t contains a floating point number in seconds since the epoch, like the
return value from time.time(), which you can use with the functions in the time
module or to construct a DateTime object.

Hope this helps,
-jfarr