aboutsummaryrefslogtreecommitdiff
path: root/pyblog
diff options
context:
space:
mode:
Diffstat (limited to '')
-rwxr-xr-xpyblog6
1 files changed, 3 insertions, 3 deletions
diff --git a/pyblog b/pyblog
index add06650..383e7b60 100755
--- a/pyblog
+++ b/pyblog
@@ -788,9 +788,9 @@ def gen_deploy(args):
mtime = os.path.getmtime(fullpath)
# get date registered in the filename, which has the format
# xxxx-xx-xx-blah-blah.md
- cdate = datetime.datetime(year=int(matchobj[1]),
- month=int(matchobj[2]),
- day=int(matchobj[3]),
+ cdate = datetime.datetime(year=int(matchobj.group(1)),
+ month=int(matchobj.group(2)),
+ day=int(matchobj.group(3)),
hour=23, minute=59, second=59,
tzinfo=dateutil.tz.tzlocal()).timestamp()
# skip the post if its source file was created more than three