aboutsummaryrefslogtreecommitdiffstats
path: root/blogthon.cgi
diff options
context:
space:
mode:
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)