diff options
author | piaip <piaip@63ad8ddf-47c3-0310-b6dd-a9e9d9715204> | 2008-04-12 02:02:15 +0800 |
---|---|---|
committer | piaip <piaip@63ad8ddf-47c3-0310-b6dd-a9e9d9715204> | 2008-04-12 02:02:15 +0800 |
commit | e962dedc874695bc349c18697d5b5619dd67305f (patch) | |
tree | 086cf4f5c92fb4589406c7bfdeadcacd0586b500 /upgrade | |
parent | 82550dfd7ab76c549cc6304edc6e623663e3e8ba (diff) | |
download | pttbbs-e962dedc874695bc349c18697d5b5619dd67305f.tar pttbbs-e962dedc874695bc349c18697d5b5619dd67305f.tar.gz pttbbs-e962dedc874695bc349c18697d5b5619dd67305f.tar.bz2 pttbbs-e962dedc874695bc349c18697d5b5619dd67305f.tar.lz pttbbs-e962dedc874695bc349c18697d5b5619dd67305f.tar.xz pttbbs-e962dedc874695bc349c18697d5b5619dd67305f.tar.zst pttbbs-e962dedc874695bc349c18697d5b5619dd67305f.zip |
- reglogdb: integer type of timestamp is easier for processing (sort).
git-svn-id: http://opensvn.csie.org/pttbbs/trunk/pttbbs@4133 63ad8ddf-47c3-0310-b6dd-a9e9d9715204
Diffstat (limited to 'upgrade')
-rwxr-xr-x | upgrade/r4132_reglog2db.py | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/upgrade/r4132_reglog2db.py b/upgrade/r4132_reglog2db.py index 5fe7ed49..b5e47e8f 100755 --- a/upgrade/r4132_reglog2db.py +++ b/upgrade/r4132_reglog2db.py @@ -22,10 +22,10 @@ def initdb(dbfn) : # since the 'rejected' is rarely used... c.execute('create table if not exists approved ' + '(uid text, name text, career text, ' + - ' addr text, phone text, date text, approved text)'); + ' addr text, phone text, date integer, approved text)'); c.execute('create table if not exists rejected ' + '(uid text, name text, career text, ' + - ' addr text, phone text, date text, rejected text)'); + ' addr text, phone text, date integer, rejected text)'); return (db, c) def processblk(m) : @@ -100,7 +100,7 @@ for s in f : sys.exit(-1) v = v[0] + ' ' + v[1] # build timestamp - v = str(int(time.mktime(time.strptime(v, "%m/%d/%Y %H:%M:%S")))) + v = int(time.mktime(time.strptime(v, "%m/%d/%Y %H:%M:%S"))) m[k] = v f.close() |