aboutsummaryrefslogtreecommitdiffstats
path: root/rss_generator.py
diff options
context:
space:
mode:
Diffstat (limited to 'rss_generator.py')
-rw-r--r--rss_generator.py10
1 files changed, 5 insertions, 5 deletions
diff --git a/rss_generator.py b/rss_generator.py
index f248003..eb4ca82 100644
--- a/rss_generator.py
+++ b/rss_generator.py
@@ -1,7 +1,7 @@
import os
from time import strftime, strptime, ctime
from siteconfig import siteconfig
-from view_functions import is_hidden_path
+from view_functions import is_hidden_path, file_last_modified
class RSS_Item:
@@ -32,7 +32,7 @@ class RSS_Item:
self.TITLE = path.rsplit('.', 1)[0].split('/')[-1]
self.FILE_TYPE = path.rsplit('.', 1)[1]
self.DESCRIPTION = self.parse_file()
- self.LAST_UPDATE = self.file_last_modified()
+ self.LAST_UPDATE = self.last_updated()
self.URI = self.get_uri()
self.LINK = siteconfig.rss_channel_config['LINK'] + self.URI
@@ -42,7 +42,7 @@ class RSS_Item:
)
def short_timestamp(self):
- return strftime("%Y-%m-%d %H:%M %z", strptime(self.LAST_UPDATE))
+ return strftime("%Y-%m-%d %H:%M", strptime(self.LAST_UPDATE))
def parse_file(self):
"""
@@ -75,8 +75,8 @@ class RSS_Item:
return ''.join(description)
- def file_last_modified(self):
- return ctime(os.stat(self.FULL_PATH).st_ctime)
+ def last_updated(self):
+ return file_last_modified(self.FULL_PATH)
def get_uri(self):
# return everything after "./templates/"