Commit b2b0eabb authored by Yoshinori Okuji's avatar Yoshinori Okuji

It seems to be necessary to subtract 1900 from year when generating a serial. Uggh.

git-svn-id: https://svn.erp5.org/repos/neo/branches/prototype3@143 71dcc9de-d417-0410-9af5-da40c76e7ee4
parent 03a391e1
......@@ -712,7 +712,7 @@ class Application(object):
def getNextTID(self):
tm = time()
gmt = gmtime(tm)
upper = (((gmt.tm_year * 12 + gmt.tm_mon) * 31 + gmt.tm_mday - 1) \
upper = ((((gmt.tm_year - 1900) * 12 + gmt.tm_mon) * 31 + gmt.tm_mday - 1) \
* 24 + gmt.tm_hour) * 60 + gmt.tm_min
lower = int((gmt.tm_sec % 60 + (tm - int(tm))) / (60.0 / 65536.0 / 65536.0))
tid = pack('!LL', upper, lower)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment