mirror of https://gitlab.com/bashrc2/epicyon
timezone
parent
2057c10715
commit
9491d06a7f
|
@ -8,7 +8,7 @@ __status__ = "Production"
|
||||||
__module_group__ = "ActivityPub"
|
__module_group__ = "ActivityPub"
|
||||||
|
|
||||||
import os
|
import os
|
||||||
from datetime import datetime
|
from datetime import datetime, timezone
|
||||||
from utils import date_from_numbers
|
from utils import date_from_numbers
|
||||||
from utils import has_object_string
|
from utils import has_object_string
|
||||||
from utils import remove_domain_port
|
from utils import remove_domain_port
|
||||||
|
@ -197,7 +197,7 @@ def remove_old_hashtags(base_dir: str, max_months: int) -> str:
|
||||||
mod_time_since_epoc = os.path.getmtime(tags_filename)
|
mod_time_since_epoc = os.path.getmtime(tags_filename)
|
||||||
last_modified_date = \
|
last_modified_date = \
|
||||||
datetime.fromtimestamp(mod_time_since_epoc,
|
datetime.fromtimestamp(mod_time_since_epoc,
|
||||||
datetime.timezone.utc)
|
timezone.utc)
|
||||||
prev_date_epoch = date_epoch()
|
prev_date_epoch = date_epoch()
|
||||||
file_days_since_epoch = \
|
file_days_since_epoch = \
|
||||||
(last_modified_date - prev_date_epoch).days
|
(last_modified_date - prev_date_epoch).days
|
||||||
|
|
|
@ -8,7 +8,7 @@ __status__ = "Production"
|
||||||
__module_group__ = "Web Interface"
|
__module_group__ = "Web Interface"
|
||||||
|
|
||||||
import os
|
import os
|
||||||
from datetime import datetime
|
from datetime import datetime, timezone
|
||||||
from utils import get_nickname_from_actor
|
from utils import get_nickname_from_actor
|
||||||
from utils import get_config_param
|
from utils import get_config_param
|
||||||
from utils import escape_text
|
from utils import escape_text
|
||||||
|
@ -100,7 +100,7 @@ def html_hash_tag_swarm(base_dir: str, actor: str, translate: {}) -> str:
|
||||||
mod_time_since_epoc = os.path.getmtime(tags_filename)
|
mod_time_since_epoc = os.path.getmtime(tags_filename)
|
||||||
last_modified_date = \
|
last_modified_date = \
|
||||||
datetime.fromtimestamp(mod_time_since_epoc,
|
datetime.fromtimestamp(mod_time_since_epoc,
|
||||||
datetime.timezone.utc)
|
timezone.utc)
|
||||||
file_days_since_epoch = \
|
file_days_since_epoch = \
|
||||||
(last_modified_date - prev_time_epoch).days
|
(last_modified_date - prev_time_epoch).days
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue