aboutsummaryrefslogtreecommitdiffstats
path: root/blogthon.cgi
diff options
context:
space:
mode:
authorStefan Ritter <xeno@thehappy.de>2010-12-09 11:14:45 +0100
committerStefan Ritter <xeno@thehappy.de>2010-12-09 11:14:45 +0100
commit64c0b794ee78f1ae50ff666f7f406be31f6630de (patch)
tree2c766801ca3f2e1a3153f2fee133c917d4d7577a /blogthon.cgi
parentcb2022a2362b91c7298617f7ba0410e05a693e2d (diff)
Timestamp fix1.0rc1
Diffstat (limited to 'blogthon.cgi')
-rwxr-xr-xblogthon.cgi9
1 files changed, 5 insertions, 4 deletions
diff --git a/blogthon.cgi b/blogthon.cgi
index 9d83df5..676e9a6 100755
--- a/blogthon.cgi
+++ b/blogthon.cgi
@@ -250,6 +250,10 @@ for entry in entries_list:
timestamp = os.stat(stampfile)
else:
timestamp = os.stat(entry)
+ stampfile = os.path.join(entries_dir, title + '.stamp')
+ stamp = open(stampfile, 'w')
+ stamp.close()
+ utime = os.utime(stampfile, (os.stat(entry)[8], os.stat(entry)[8]))
timestamp = time.localtime(timestamp[8])
entry = timestamp, entry
@@ -480,10 +484,7 @@ else:
title = title.replace('.' + entries_suffix, '')
stampfile = os.path.join(entries_dir, title + '.stamp')
- if not os.path.exists(stampfile):
- stamp = open(stampfile, 'w')
- stamp.close()
- else:
+ if os.path.exists(stampfile):
date = time.localtime(os.stat(stampfile)[8])
date = time.strftime("%c", date)