diff --git a/daemon.py b/daemon.py index 6fa094d0d..a8ce16510 100644 --- a/daemon.py +++ b/daemon.py @@ -247,6 +247,7 @@ from languages import set_actor_languages from languages import get_understood_languages from like import update_likes_collection from reaction import update_reaction_collection +from utils import load_account_timezones from utils import local_network_host from utils import undo_reaction_collection_entry from utils import get_new_post_endpoints @@ -3544,6 +3545,10 @@ class PubServer(BaseHTTPRequestHandler): if search_str.startswith('#'): nickname = get_nickname_from_actor(actor_str) # hashtag search + timezone = None + if self.server.account_timezone.get(nickname): + timezone = \ + self.server.account_timezone.get(nickname) hashtag_str = \ html_hashtag_search(self.server.css_cache, nickname, domain, port, @@ -3568,7 +3573,8 @@ class PubServer(BaseHTTPRequestHandler): self.server.max_like_count, self.server.signing_priv_key_pem, self.server.cw_lists, - self.server.lists_enabled) + self.server.lists_enabled, + timezone) if hashtag_str: msg = hashtag_str.encode('utf-8') msglen = len(msg) @@ -3636,6 +3642,10 @@ class PubServer(BaseHTTPRequestHandler): # your post history search nickname = get_nickname_from_actor(actor_str) search_str = search_str.replace("'", '', 1).strip() + timezone = None + if self.server.account_timezone.get(nickname): + timezone = \ + self.server.account_timezone.get(nickname) history_str = \ html_history_search(self.server.css_cache, self.server.translate, @@ -3663,7 +3673,8 @@ class PubServer(BaseHTTPRequestHandler): self.server.max_like_count, self.server.signing_priv_key_pem, self.server.cw_lists, - self.server.lists_enabled) + self.server.lists_enabled, + timezone) if history_str: msg = history_str.encode('utf-8') msglen = len(msg) @@ -3704,6 +3715,10 @@ class PubServer(BaseHTTPRequestHandler): # bookmark search nickname = get_nickname_from_actor(actor_str) search_str = search_str.replace('-', '', 1).strip() + timezone = None + if self.server.account_timezone.get(nickname): + timezone = \ + self.server.account_timezone.get(nickname) bookmarks_str = \ html_history_search(self.server.css_cache, self.server.translate, @@ -3731,7 +3746,8 @@ class PubServer(BaseHTTPRequestHandler): self.server.max_like_count, self.server.signing_priv_key_pem, self.server.cw_lists, - self.server.lists_enabled) + self.server.lists_enabled, + timezone) if bookmarks_str: msg = bookmarks_str.encode('utf-8') msglen = len(msg) @@ -3811,6 +3827,10 @@ class PubServer(BaseHTTPRequestHandler): self.server.cached_webfingers recent_posts_cache = \ self.server.recent_posts_cache + timezone = None + if self.server.account_timezone.get(nickname): + timezone = \ + self.server.account_timezone.get(nickname) profile_str = \ html_profile_after_search(self.server.css_cache, recent_posts_cache, @@ -3840,7 +3860,8 @@ class PubServer(BaseHTTPRequestHandler): self.server.max_like_count, signing_priv_key_pem, self.server.cw_lists, - self.server.lists_enabled) + self.server.lists_enabled, + timezone) if profile_str: msg = profile_str.encode('utf-8') msglen = len(msg) @@ -7835,6 +7856,10 @@ class PubServer(BaseHTTPRequestHandler): nickname = nickname.split('/')[0] if '?' in nickname: nickname = nickname.split('?')[0] + timezone = None + if self.server.account_timezone.get(nickname): + timezone = \ + self.server.account_timezone.get(nickname) hashtag_str = \ html_hashtag_search(self.server.css_cache, nickname, domain, port, @@ -7857,7 +7882,8 @@ class PubServer(BaseHTTPRequestHandler): self.server.max_like_count, self.server.signing_priv_key_pem, self.server.cw_lists, - self.server.lists_enabled) + self.server.lists_enabled, + timezone) if hashtag_str: msg = hashtag_str.encode('utf-8') msglen = len(msg) @@ -8047,6 +8073,10 @@ class PubServer(BaseHTTPRequestHandler): follower_approval_active(base_dir, self.post_to_nickname, domain) show_repeats = not is_dm(announce_json) + timezone = None + if self.server.account_timezone.get(self.post_to_nickname): + timezone = \ + self.server.account_timezone.get(self.post_to_nickname) individual_post_as_html(self.server.signing_priv_key_pem, False, self.server.recent_posts_cache, self.server.max_recent_posts, @@ -8074,7 +8104,8 @@ class PubServer(BaseHTTPRequestHandler): manually_approve_followers, False, True, False, self.server.cw_lists, - self.server.lists_enabled) + self.server.lists_enabled, + timezone) actor_absolute = self._get_instance_url(calling_domain) + actor actor_path_str = \ @@ -8516,6 +8547,10 @@ class PubServer(BaseHTTPRequestHandler): follower_approval_active(base_dir, self.post_to_nickname, domain) show_repeats = not is_dm(liked_post_json) + timezone = None + if self.server.account_timezone.get(self.post_to_nickname): + timezone = \ + self.server.account_timezone.get(self.post_to_nickname) individual_post_as_html(self.server.signing_priv_key_pem, False, self.server.recent_posts_cache, @@ -8545,7 +8580,8 @@ class PubServer(BaseHTTPRequestHandler): manually_approve_followers, False, True, False, self.server.cw_lists, - self.server.lists_enabled) + self.server.lists_enabled, + timezone) else: print('WARN: Liked post not found: ' + liked_post_filename) # clear the icon from the cache so that it gets updated @@ -8674,6 +8710,10 @@ class PubServer(BaseHTTPRequestHandler): follower_approval_active(base_dir, self.post_to_nickname, domain) show_repeats = not is_dm(liked_post_json) + timezone = None + if self.server.account_timezone.get(self.post_to_nickname): + timezone = \ + self.server.account_timezone.get(self.post_to_nickname) individual_post_as_html(self.server.signing_priv_key_pem, False, self.server.recent_posts_cache, @@ -8703,7 +8743,8 @@ class PubServer(BaseHTTPRequestHandler): manually_approve_followers, False, True, False, self.server.cw_lists, - self.server.lists_enabled) + self.server.lists_enabled, + timezone) else: print('WARN: Unliked post not found: ' + liked_post_filename) # clear the icon from the cache so that it gets updated @@ -8861,6 +8902,10 @@ class PubServer(BaseHTTPRequestHandler): follower_approval_active(base_dir, self.post_to_nickname, domain) show_repeats = not is_dm(reaction_post_json) + timezone = None + if self.server.account_timezone.get(self.post_to_nickname): + timezone = \ + self.server.account_timezone.get(self.post_to_nickname) individual_post_as_html(self.server.signing_priv_key_pem, False, self.server.recent_posts_cache, @@ -8890,7 +8935,8 @@ class PubServer(BaseHTTPRequestHandler): manually_approve_followers, False, True, False, self.server.cw_lists, - self.server.lists_enabled) + self.server.lists_enabled, + timezone) else: print('WARN: Emoji reaction post not found: ' + reaction_post_filename) @@ -9038,6 +9084,10 @@ class PubServer(BaseHTTPRequestHandler): follower_approval_active(base_dir, self.post_to_nickname, domain) show_repeats = not is_dm(reaction_post_json) + timezone = None + if self.server.account_timezone.get(self.post_to_nickname): + timezone = \ + self.server.account_timezone.get(self.post_to_nickname) individual_post_as_html(self.server.signing_priv_key_pem, False, self.server.recent_posts_cache, @@ -9067,7 +9117,8 @@ class PubServer(BaseHTTPRequestHandler): manually_approve_followers, False, True, False, self.server.cw_lists, - self.server.lists_enabled) + self.server.lists_enabled, + timezone) else: print('WARN: Unreaction post not found: ' + reaction_post_filename) @@ -9139,6 +9190,10 @@ class PubServer(BaseHTTPRequestHandler): self._redirect_headers(actor_path_str, cookie, calling_domain) return + timezone = None + if self.server.account_timezone.get(self.post_to_nickname): + timezone = \ + self.server.account_timezone.get(self.post_to_nickname) msg = \ html_emoji_reaction_picker(self.server.css_cache, self.server.recent_posts_cache, @@ -9163,7 +9218,8 @@ class PubServer(BaseHTTPRequestHandler): self.server.signing_priv_key_pem, self.server.cw_lists, self.server.lists_enabled, - timeline_str, page_number) + timeline_str, page_number, + timezone) msg = msg.encode('utf-8') msglen = len(msg) self._set_headers('text/html', msglen, @@ -9260,6 +9316,10 @@ class PubServer(BaseHTTPRequestHandler): follower_approval_active(base_dir, self.post_to_nickname, domain) show_repeats = not is_dm(bookmark_post_json) + timezone = None + if self.server.account_timezone.get(self.post_to_nickname): + timezone = \ + self.server.account_timezone.get(self.post_to_nickname) individual_post_as_html(self.server.signing_priv_key_pem, False, self.server.recent_posts_cache, @@ -9289,7 +9349,8 @@ class PubServer(BaseHTTPRequestHandler): manually_approve_followers, False, True, False, self.server.cw_lists, - self.server.lists_enabled) + self.server.lists_enabled, + timezone) else: print('WARN: Bookmarked post not found: ' + bookmark_filename) # self._post_to_outbox(bookmark_json, @@ -9391,6 +9452,10 @@ class PubServer(BaseHTTPRequestHandler): follower_approval_active(base_dir, self.post_to_nickname, domain) show_repeats = not is_dm(bookmark_post_json) + timezone = None + if self.server.account_timezone.get(self.post_to_nickname): + timezone = \ + self.server.account_timezone.get(self.post_to_nickname) individual_post_as_html(self.server.signing_priv_key_pem, False, self.server.recent_posts_cache, @@ -9420,7 +9485,8 @@ class PubServer(BaseHTTPRequestHandler): manually_approve_followers, False, True, False, self.server.cw_lists, - self.server.lists_enabled) + self.server.lists_enabled, + timezone) else: print('WARN: Unbookmarked post not found: ' + bookmark_filename) @@ -9596,6 +9662,10 @@ class PubServer(BaseHTTPRequestHandler): allow_downloads = False show_avatar_options = True avatar_url = None + timezone = None + if self.server.account_timezone.get(nickname): + timezone = \ + self.server.account_timezone.get(nickname) individual_post_as_html(self.server.signing_priv_key_pem, allow_downloads, self.server.recent_posts_cache, @@ -9626,7 +9696,8 @@ class PubServer(BaseHTTPRequestHandler): show_public_only, store_to_cache, use_cache_only, self.server.cw_lists, - self.server.lists_enabled) + self.server.lists_enabled, + timezone) else: print('WARN: Muted post not found: ' + mute_filename) @@ -9707,6 +9778,10 @@ class PubServer(BaseHTTPRequestHandler): allow_downloads = False show_avatar_options = True avatar_url = None + timezone = None + if self.server.account_timezone.get(nickname): + timezone = \ + self.server.account_timezone.get(nickname) individual_post_as_html(self.server.signing_priv_key_pem, allow_downloads, self.server.recent_posts_cache, @@ -9737,7 +9812,8 @@ class PubServer(BaseHTTPRequestHandler): show_public_only, store_to_cache, use_cache_only, self.server.cw_lists, - self.server.lists_enabled) + self.server.lists_enabled, + timezone) else: print('WARN: Unmuted post not found: ' + mute_filename) if calling_domain.endswith('.onion') and onion_domain: @@ -9830,6 +9906,10 @@ class PubServer(BaseHTTPRequestHandler): twitter_replacement_domain = \ self.server.twitter_replacement_domain peertube_instances = self.server.peertube_instances + timezone = None + if self.server.account_timezone.get(nickname): + timezone = \ + self.server.account_timezone.get(nickname) msg = \ html_post_replies(self.server.css_cache, recent_posts_cache, @@ -9855,7 +9935,8 @@ class PubServer(BaseHTTPRequestHandler): self.server.max_like_count, self.server.signing_priv_key_pem, self.server.cw_lists, - self.server.lists_enabled) + self.server.lists_enabled, + timezone) msg = msg.encode('utf-8') msglen = len(msg) self._set_headers('text/html', msglen, @@ -9922,6 +10003,10 @@ class PubServer(BaseHTTPRequestHandler): twitter_replacement_domain = \ self.server.twitter_replacement_domain peertube_instances = self.server.peertube_instances + timezone = None + if self.server.account_timezone.get(nickname): + timezone = \ + self.server.account_timezone.get(nickname) msg = \ html_post_replies(self.server.css_cache, recent_posts_cache, @@ -9947,7 +10032,8 @@ class PubServer(BaseHTTPRequestHandler): self.server.max_like_count, self.server.signing_priv_key_pem, self.server.cw_lists, - self.server.lists_enabled) + self.server.lists_enabled, + timezone) msg = msg.encode('utf-8') msglen = len(msg) self._set_headers('text/html', msglen, @@ -10027,6 +10113,11 @@ class PubServer(BaseHTTPRequestHandler): base_dir, nickname, domain) shared_items_federated_domains = \ self.server.shared_items_federated_domains + + timezone = None + if self.server.account_timezone.get(nickname): + timezone = \ + self.server.account_timezone.get(nickname) msg = \ html_profile(self.server.signing_priv_key_pem, self.server.rss_icon_at_top, @@ -10059,7 +10150,8 @@ class PubServer(BaseHTTPRequestHandler): roles_list, None, None, self.server.cw_lists, self.server.lists_enabled, - self.server.content_license_url) + self.server.content_license_url, + timezone) msg = msg.encode('utf-8') msglen = len(msg) self._set_headers('text/html', msglen, @@ -10146,6 +10238,11 @@ class PubServer(BaseHTTPRequestHandler): self.server.content_license_url peertube_instances = \ self.server.peertube_instances + timezone = None + nick = nickname + if self.server.account_timezone.get(nick): + timezone = \ + self.server.account_timezone.get(nick) msg = \ html_profile(signing_priv_key_pem, self.server.rss_icon_at_top, @@ -10179,7 +10276,8 @@ class PubServer(BaseHTTPRequestHandler): None, None, self.server.cw_lists, self.server.lists_enabled, - content_license_url) + content_license_url, + timezone) msg = msg.encode('utf-8') msglen = len(msg) self._set_headers('text/html', msglen, @@ -10320,6 +10418,10 @@ class PubServer(BaseHTTPRequestHandler): return True remove_post_interactions(pjo, True) if self._request_http(): + timezone = None + if self.server.account_timezone.get(nickname): + timezone = \ + self.server.account_timezone.get(nickname) msg = \ html_individual_post(self.server.css_cache, self.server.recent_posts_cache, @@ -10345,7 +10447,8 @@ class PubServer(BaseHTTPRequestHandler): self.server.max_like_count, self.server.signing_priv_key_pem, self.server.cw_lists, - self.server.lists_enabled) + self.server.lists_enabled, + timezone) msg = msg.encode('utf-8') msglen = len(msg) self._set_headers('text/html', msglen, @@ -10573,6 +10676,10 @@ class PubServer(BaseHTTPRequestHandler): self.server.shared_items_federated_domains allow_local_network_access = \ self.server.allow_local_network_access + timezone = None + if self.server.account_timezone.get(nickname): + timezone = \ + self.server.account_timezone.get(nickname) msg = html_inbox(self.server.css_cache, default_timeline, recent_posts_cache, @@ -10612,7 +10719,8 @@ class PubServer(BaseHTTPRequestHandler): shared_items_federated_domains, self.server.signing_priv_key_pem, self.server.cw_lists, - self.server.lists_enabled) + self.server.lists_enabled, + timezone) if getreq_start_time: fitness_performance(getreq_start_time, self.server.fitness, @@ -10727,6 +10835,10 @@ class PubServer(BaseHTTPRequestHandler): self.server.twitter_replacement_domain show_published_date_only = \ self.server.show_published_date_only + timezone = None + if self.server.account_timezone.get(nickname): + timezone = \ + self.server.account_timezone.get(nickname) msg = \ html_inbox_dms(self.server.css_cache, self.server.default_timeline, @@ -10766,7 +10878,8 @@ class PubServer(BaseHTTPRequestHandler): shared_items_federated_domains, self.server.signing_priv_key_pem, self.server.cw_lists, - self.server.lists_enabled) + self.server.lists_enabled, + timezone) msg = msg.encode('utf-8') msglen = len(msg) self._set_headers('text/html', msglen, @@ -10874,6 +10987,10 @@ class PubServer(BaseHTTPRequestHandler): self.server.twitter_replacement_domain show_published_date_only = \ self.server.show_published_date_only + timezone = None + if self.server.account_timezone.get(nickname): + timezone = \ + self.server.account_timezone.get(nickname) msg = \ html_inbox_replies(self.server.css_cache, self.server.default_timeline, @@ -10913,7 +11030,8 @@ class PubServer(BaseHTTPRequestHandler): shared_items_federated_domains, self.server.signing_priv_key_pem, self.server.cw_lists, - self.server.lists_enabled) + self.server.lists_enabled, + timezone) msg = msg.encode('utf-8') msglen = len(msg) self._set_headers('text/html', msglen, @@ -11018,6 +11136,10 @@ class PubServer(BaseHTTPRequestHandler): self.server.allow_local_network_access twitter_replacement_domain = \ self.server.twitter_replacement_domain + timezone = None + if self.server.account_timezone.get(nickname): + timezone = \ + self.server.account_timezone.get(nickname) msg = \ html_inbox_media(self.server.css_cache, self.server.default_timeline, @@ -11058,7 +11180,8 @@ class PubServer(BaseHTTPRequestHandler): fed_domains, self.server.signing_priv_key_pem, self.server.cw_lists, - self.server.lists_enabled) + self.server.lists_enabled, + timezone) msg = msg.encode('utf-8') msglen = len(msg) self._set_headers('text/html', msglen, @@ -11163,6 +11286,10 @@ class PubServer(BaseHTTPRequestHandler): self.server.allow_local_network_access twitter_replacement_domain = \ self.server.twitter_replacement_domain + timezone = None + if self.server.account_timezone.get(nickname): + timezone = \ + self.server.account_timezone.get(nickname) msg = \ html_inbox_blogs(self.server.css_cache, self.server.default_timeline, @@ -11203,7 +11330,8 @@ class PubServer(BaseHTTPRequestHandler): fed_domains, self.server.signing_priv_key_pem, self.server.cw_lists, - self.server.lists_enabled) + self.server.lists_enabled, + timezone) msg = msg.encode('utf-8') msglen = len(msg) self._set_headers('text/html', msglen, @@ -11316,6 +11444,10 @@ class PubServer(BaseHTTPRequestHandler): fed_domains = \ self.server.shared_items_federated_domains + timezone = None + if self.server.account_timezone.get(nickname): + timezone = \ + self.server.account_timezone.get(nickname) msg = \ html_inbox_news(self.server.css_cache, self.server.default_timeline, @@ -11357,7 +11489,8 @@ class PubServer(BaseHTTPRequestHandler): fed_domains, self.server.signing_priv_key_pem, self.server.cw_lists, - self.server.lists_enabled) + self.server.lists_enabled, + timezone) msg = msg.encode('utf-8') msglen = len(msg) self._set_headers('text/html', msglen, @@ -11473,6 +11606,10 @@ class PubServer(BaseHTTPRequestHandler): self.server.twitter_replacement_domain show_published_date_only = \ self.server.show_published_date_only + timezone = None + if self.server.account_timezone.get(nickname): + timezone = \ + self.server.account_timezone.get(nickname) msg = \ html_inbox_features(self.server.css_cache, self.server.default_timeline, @@ -11514,7 +11651,8 @@ class PubServer(BaseHTTPRequestHandler): shared_items_federated_domains, self.server.signing_priv_key_pem, self.server.cw_lists, - self.server.lists_enabled) + self.server.lists_enabled, + timezone) msg = msg.encode('utf-8') msglen = len(msg) self._set_headers('text/html', msglen, @@ -11585,6 +11723,10 @@ class PubServer(BaseHTTPRequestHandler): full_width_tl_button_header = \ self.server.full_width_tl_button_header + timezone = None + if self.server.account_timezone.get(nickname): + timezone = \ + self.server.account_timezone.get(nickname) msg = \ html_shares(self.server.css_cache, self.server.default_timeline, @@ -11622,7 +11764,7 @@ class PubServer(BaseHTTPRequestHandler): self.server.shared_items_federated_domains, self.server.signing_priv_key_pem, self.server.cw_lists, - self.server.lists_enabled) + self.server.lists_enabled, timezone) msg = msg.encode('utf-8') msglen = len(msg) self._set_headers('text/html', msglen, @@ -11670,6 +11812,10 @@ class PubServer(BaseHTTPRequestHandler): self.server.key_shortcuts[nickname] full_width_tl_button_header = \ self.server.full_width_tl_button_header + timezone = None + if self.server.account_timezone.get(nickname): + timezone = \ + self.server.account_timezone.get(nickname) msg = \ html_wanted(self.server.css_cache, self.server.default_timeline, @@ -11707,7 +11853,8 @@ class PubServer(BaseHTTPRequestHandler): self.server.shared_items_federated_domains, self.server.signing_priv_key_pem, self.server.cw_lists, - self.server.lists_enabled) + self.server.lists_enabled, + timezone) msg = msg.encode('utf-8') msglen = len(msg) self._set_headers('text/html', msglen, @@ -11794,6 +11941,10 @@ class PubServer(BaseHTTPRequestHandler): self.server.twitter_replacement_domain show_published_date_only = \ self.server.show_published_date_only + timezone = None + if self.server.account_timezone.get(nickname): + timezone = \ + self.server.account_timezone.get(nickname) msg = \ html_bookmarks(self.server.css_cache, self.server.default_timeline, @@ -11834,7 +11985,8 @@ class PubServer(BaseHTTPRequestHandler): shared_items_federated_domains, self.server.signing_priv_key_pem, self.server.cw_lists, - self.server.lists_enabled) + self.server.lists_enabled, + timezone) msg = msg.encode('utf-8') msglen = len(msg) self._set_headers('text/html', msglen, @@ -11934,6 +12086,10 @@ class PubServer(BaseHTTPRequestHandler): access_keys = \ self.server.key_shortcuts[nickname] + timezone = None + if self.server.account_timezone.get(nickname): + timezone = \ + self.server.account_timezone.get(nickname) msg = \ html_outbox(self.server.css_cache, self.server.default_timeline, @@ -11972,7 +12128,8 @@ class PubServer(BaseHTTPRequestHandler): self.server.shared_items_federated_domains, self.server.signing_priv_key_pem, self.server.cw_lists, - self.server.lists_enabled) + self.server.lists_enabled, + timezone) msg = msg.encode('utf-8') msglen = len(msg) self._set_headers('text/html', msglen, @@ -12068,6 +12225,10 @@ class PubServer(BaseHTTPRequestHandler): self.server.allow_local_network_access show_published_date_only = \ self.server.show_published_date_only + timezone = None + if self.server.account_timezone.get(nickname): + timezone = \ + self.server.account_timezone.get(nickname) msg = \ html_moderation(self.server.css_cache, self.server.default_timeline, @@ -12107,7 +12268,8 @@ class PubServer(BaseHTTPRequestHandler): shared_items_federated_domains, self.server.signing_priv_key_pem, self.server.cw_lists, - self.server.lists_enabled) + self.server.lists_enabled, + timezone) msg = msg.encode('utf-8') msglen = len(msg) self._set_headers('text/html', msglen, @@ -12198,6 +12360,10 @@ class PubServer(BaseHTTPRequestHandler): base_dir, nickname, domain) shared_items_federated_domains = \ self.server.shared_items_federated_domains + timezone = None + if self.server.account_timezone.get(nickname): + timezone = \ + self.server.account_timezone.get(nickname) msg = \ html_profile(self.server.signing_priv_key_pem, self.server.rss_icon_at_top, @@ -12232,7 +12398,8 @@ class PubServer(BaseHTTPRequestHandler): page_number, SHARES_PER_PAGE, self.server.cw_lists, self.server.lists_enabled, - self.server.content_license_url) + self.server.content_license_url, + timezone) msg = msg.encode('utf-8') msglen = len(msg) self._set_headers('text/html', msglen, @@ -12307,6 +12474,7 @@ class PubServer(BaseHTTPRequestHandler): access_keys = self.server.access_keys city = None + timezone = None if '/users/' in path: nickname = path.split('/users/')[1] if '/' in nickname: @@ -12317,6 +12485,9 @@ class PubServer(BaseHTTPRequestHandler): city = get_spoofed_city(self.server.city, base_dir, nickname, domain) + if self.server.account_timezone.get(nickname): + timezone = \ + self.server.account_timezone.get(nickname) content_license_url = \ self.server.content_license_url shared_items_federated_domains = \ @@ -12356,7 +12527,8 @@ class PubServer(BaseHTTPRequestHandler): FOLLOWS_PER_PAGE, self.server.cw_lists, self.server.lists_enabled, - content_license_url).encode('utf-8') + content_license_url, + timezone).encode('utf-8') msglen = len(msg) self._set_headers('text/html', msglen, cookie, calling_domain, False) @@ -12428,6 +12600,7 @@ class PubServer(BaseHTTPRequestHandler): access_keys = self.server.access_keys city = None + timezone = None if '/users/' in path: nickname = path.split('/users/')[1] if '/' in nickname: @@ -12438,6 +12611,9 @@ class PubServer(BaseHTTPRequestHandler): city = get_spoofed_city(self.server.city, base_dir, nickname, domain) + if self.server.account_timezone.get(nickname): + timezone = \ + self.server.account_timezone.get(nickname) content_license_url = \ self.server.content_license_url shared_items_federated_domains = \ @@ -12478,7 +12654,8 @@ class PubServer(BaseHTTPRequestHandler): FOLLOWS_PER_PAGE, self.server.cw_lists, self.server.lists_enabled, - content_license_url).encode('utf-8') + content_license_url, + timezone).encode('utf-8') msglen = len(msg) self._set_headers('text/html', msglen, cookie, calling_domain, False) @@ -12568,6 +12745,7 @@ class PubServer(BaseHTTPRequestHandler): access_keys = self.server.access_keys city = None + timezone = None if '/users/' in path: nickname = path.split('/users/')[1] if '/' in nickname: @@ -12578,6 +12756,9 @@ class PubServer(BaseHTTPRequestHandler): city = get_spoofed_city(self.server.city, base_dir, nickname, domain) + if self.server.account_timezone.get(nickname): + timezone = \ + self.server.account_timezone.get(nickname) msg = \ html_profile(self.server.signing_priv_key_pem, self.server.rss_icon_at_top, @@ -12612,7 +12793,8 @@ class PubServer(BaseHTTPRequestHandler): None, None, None, self.server.cw_lists, self.server.lists_enabled, - self.server.content_license_url).encode('utf-8') + self.server.content_license_url, + timezone).encode('utf-8') msglen = len(msg) self._set_headers('text/html', msglen, cookie, calling_domain, False) @@ -19217,6 +19399,8 @@ def run_daemon(dyslexic_font: bool, # scan the theme directory for any svg files containing scripts assert not scan_themes_for_scripts(base_dir) + httpd.account_timezone = load_account_timezones(base_dir) + httpd.post_to_nickname = None httpd.nodeinfo_is_active = False diff --git a/inbox.py b/inbox.py index 72aef9df6..2cdc5d58c 100644 --- a/inbox.py +++ b/inbox.py @@ -17,6 +17,7 @@ from languages import understood_post_language from like import update_likes_collection from reaction import update_reaction_collection from reaction import valid_emoji_content +from utils import get_account_timezone from utils import domain_permitted from utils import is_group_account from utils import is_system_account @@ -294,7 +295,8 @@ def _inbox_store_post_to_html_cache(recent_posts_cache: {}, max_like_count: int, signing_priv_key_pem: str, cw_lists: {}, - lists_enabled: str) -> None: + lists_enabled: str, + timezone: str) -> None: """Converts the json post into html and stores it in a cache This enables the post to be quickly displayed later """ @@ -319,7 +321,7 @@ def _inbox_store_post_to_html_cache(recent_posts_cache: {}, peertube_instances, allow_local_network_access, theme_name, system_language, max_like_count, not_dm, True, True, False, True, False, - cw_lists, lists_enabled) + cw_lists, lists_enabled, timezone) def valid_inbox(base_dir: str, nickname: str, domain: str) -> bool: @@ -1100,6 +1102,7 @@ def _receive_like(recent_posts_cache: {}, manually_approve_followers = \ follower_approval_active(base_dir, handle_name, domain) not_dm = not is_dm(liked_post_json) + timezone = get_account_timezone(base_dir, handle_name, domain) individual_post_as_html(signing_priv_key_pem, False, recent_posts_cache, max_recent_posts, translate, page_number, base_dir, @@ -1118,7 +1121,7 @@ def _receive_like(recent_posts_cache: {}, show_individual_post_icons, manually_approve_followers, False, True, False, cw_lists, - lists_enabled) + lists_enabled, timezone) return True @@ -1213,6 +1216,7 @@ def _receive_undo_like(recent_posts_cache: {}, manually_approve_followers = \ follower_approval_active(base_dir, handle_name, domain) not_dm = not is_dm(liked_post_json) + timezone = get_account_timezone(base_dir, handle_name, domain) individual_post_as_html(signing_priv_key_pem, False, recent_posts_cache, max_recent_posts, translate, page_number, base_dir, @@ -1231,7 +1235,7 @@ def _receive_undo_like(recent_posts_cache: {}, show_individual_post_icons, manually_approve_followers, False, True, False, cw_lists, - lists_enabled) + lists_enabled, timezone) return True @@ -1362,6 +1366,7 @@ def _receive_reaction(recent_posts_cache: {}, manually_approve_followers = \ follower_approval_active(base_dir, handle_name, domain) not_dm = not is_dm(reaction_post_json) + timezone = get_account_timezone(base_dir, handle_name, domain) individual_post_as_html(signing_priv_key_pem, False, recent_posts_cache, max_recent_posts, translate, page_number, base_dir, @@ -1381,7 +1386,7 @@ def _receive_reaction(recent_posts_cache: {}, show_individual_post_icons, manually_approve_followers, False, True, False, cw_lists, - lists_enabled) + lists_enabled, timezone) return True @@ -1495,6 +1500,7 @@ def _receive_undo_reaction(recent_posts_cache: {}, manually_approve_followers = \ follower_approval_active(base_dir, handle_name, domain) not_dm = not is_dm(reaction_post_json) + timezone = get_account_timezone(base_dir, handle_name, domain) individual_post_as_html(signing_priv_key_pem, False, recent_posts_cache, max_recent_posts, translate, page_number, base_dir, @@ -1514,7 +1520,7 @@ def _receive_undo_reaction(recent_posts_cache: {}, show_individual_post_icons, manually_approve_followers, False, True, False, cw_lists, - lists_enabled) + lists_enabled, timezone) return True @@ -1606,6 +1612,7 @@ def _receive_bookmark(recent_posts_cache: {}, manually_approve_followers = \ follower_approval_active(base_dir, nickname, domain) not_dm = not is_dm(bookmarked_post_json) + timezone = get_account_timezone(base_dir, nickname, domain) individual_post_as_html(signing_priv_key_pem, False, recent_posts_cache, max_recent_posts, translate, page_number, base_dir, @@ -1624,7 +1631,7 @@ def _receive_bookmark(recent_posts_cache: {}, show_individual_post_icons, manually_approve_followers, False, True, False, cw_lists, - lists_enabled) + lists_enabled, timezone) return True @@ -1720,6 +1727,7 @@ def _receive_undo_bookmark(recent_posts_cache: {}, manually_approve_followers = \ follower_approval_active(base_dir, nickname, domain) not_dm = not is_dm(bookmarked_post_json) + timezone = get_account_timezone(base_dir, nickname, domain) individual_post_as_html(signing_priv_key_pem, False, recent_posts_cache, max_recent_posts, translate, page_number, base_dir, @@ -1737,7 +1745,8 @@ def _receive_undo_bookmark(recent_posts_cache: {}, max_like_count, not_dm, show_individual_post_icons, manually_approve_followers, - False, True, False, cw_lists, lists_enabled) + False, True, False, cw_lists, lists_enabled, + timezone) return True @@ -1926,6 +1935,7 @@ def _receive_announce(recent_posts_cache: {}, not_dm = True if debug: print('Generating html for announce ' + message_json['id']) + timezone = get_account_timezone(base_dir, nickname, domain) announce_html = \ individual_post_as_html(signing_priv_key_pem, True, recent_posts_cache, max_recent_posts, @@ -1945,7 +1955,7 @@ def _receive_announce(recent_posts_cache: {}, show_individual_post_icons, manually_approve_followers, False, True, False, cw_lists, - lists_enabled) + lists_enabled, timezone) if not announce_html: print('WARN: Unable to generate html for announce ' + str(message_json)) @@ -3060,6 +3070,7 @@ def _receive_question_vote(base_dir: str, nickname: str, domain: str, manually_approve_followers = \ follower_approval_active(base_dir, nickname, domain) not_dm = not is_dm(question_json) + timezone = get_account_timezone(base_dir, nickname, domain) individual_post_as_html(signing_priv_key_pem, False, recent_posts_cache, max_recent_posts, translate, page_number, base_dir, @@ -3078,7 +3089,7 @@ def _receive_question_vote(base_dir: str, nickname: str, domain: str, show_individual_post_icons, manually_approve_followers, False, True, False, cw_lists, - lists_enabled) + lists_enabled, timezone) # add id to inbox index inbox_update_index('inbox', base_dir, handle, @@ -3600,6 +3611,8 @@ def _inbox_after_initial(recent_posts_cache: {}, max_recent_posts: int, handle_name = handle.split('@')[0] allow_local_net_access = allow_local_network_access show_pub_date_only = show_published_date_only + timezone = get_account_timezone(base_dir, + handle_name, domain) _inbox_store_post_to_html_cache(recent_posts_cache, max_recent_posts, translate, base_dir, @@ -3620,7 +3633,8 @@ def _inbox_after_initial(recent_posts_cache: {}, max_recent_posts: int, max_like_count, signing_priv_key_pem, cw_lists, - lists_enabled) + lists_enabled, + timezone) if debug: time_diff = \ str(int((time.time() - html_cache_start_time) * diff --git a/outbox.py b/outbox.py index 371d7ae20..81f65458a 100644 --- a/outbox.py +++ b/outbox.py @@ -16,6 +16,7 @@ from posts import outbox_message_create_wrap from posts import save_post_to_box from posts import send_to_followers_thread from posts import send_to_named_addresses_thread +from utils import get_account_timezone from utils import has_object_stringType from utils import get_base_content_from_post from utils import has_object_dict @@ -454,6 +455,9 @@ def post_message_to_outbox(session, translate: {}, manually_approve_followers = \ follower_approval_active(base_dir, post_to_nickname, domain) + timezone = \ + get_account_timezone(base_dir, + post_to_nickname, domain) individual_post_as_html(signing_priv_key_pem, False, recent_posts_cache, max_recent_posts, @@ -477,7 +481,8 @@ def post_message_to_outbox(session, translate: {}, show_individual_post_icons, manually_approve_followers, False, True, use_cache_only, - cw_lists, lists_enabled) + cw_lists, lists_enabled, + timezone) if outbox_announce(recent_posts_cache, base_dir, message_json, debug): diff --git a/utils.py b/utils.py index bd7206b69..b8891589a 100644 --- a/utils.py +++ b/utils.py @@ -15,6 +15,7 @@ import datetime import json import idna import locale +from dateutil import tz from pprint import pprint from cryptography.hazmat.backends import default_backend from cryptography.hazmat.primitives import hashes @@ -3350,3 +3351,54 @@ def valid_hash_tag(hashtag: str) -> bool: if _is_valid_language(hashtag): return True return False + + +def convert_published_to_local_timezone(published, timezone: str) -> str: + """Converts a post published time into local time + """ + from_zone = tz.gettz('UTC') + if timezone: + to_zone = tz.gettz(timezone) + else: + to_zone = tz.tzlocal() + + utc = published.replace(tzinfo=from_zone) + local_time = utc.astimezone(to_zone) + return local_time + + +def load_account_timezones(base_dir: str) -> {}: + """Returns a dictionary containing the preferred timezone for each account + """ + account_timezone = {} + for subdir, dirs, files in os.walk(base_dir + '/accounts'): + for acct in dirs: + if '@' not in acct: + continue + if acct.startswith('inbox@') or acct.startswith('Actor@'): + continue + acct_dir = os.path.join(base_dir + '/accounts', acct) + tz_filename = acct_dir + '/timezone.txt' + if not os.path.isfile(tz_filename): + continue + timezone = None + with open(tz_filename, 'r') as fp_timezone: + timezone = fp_timezone.read().strip() + if timezone: + nickname = acct.split('@')[0] + account_timezone[nickname] = timezone + break + return account_timezone + + +def get_account_timezone(base_dir: str, nickname: str, domain: str) -> str: + """Returns the timezone for the given account + """ + tz_filename = \ + base_dir + '/accounts/' + nickname + '@' + domain + '/timezone.txt' + if not os.path.isfile(tz_filename): + return None + timezone = None + with open(tz_filename, 'r') as fp_timezone: + timezone = fp_timezone.read().strip() + return timezone diff --git a/webapp_confirm.py b/webapp_confirm.py index 6eb79d6ac..7e64348de 100644 --- a/webapp_confirm.py +++ b/webapp_confirm.py @@ -17,6 +17,7 @@ from utils import load_json from utils import get_config_param from utils import get_alt_path from utils import acct_dir +from utils import get_account_timezone from webapp_utils import set_custom_background from webapp_utils import html_header_with_external_style from webapp_utils import html_footer @@ -64,6 +65,7 @@ def html_confirm_delete(css_cache: {}, get_config_param(base_dir, 'instanceTitle') delete_post_str = \ html_header_with_external_style(css_filename, instance_title, None) + timezone = get_account_timezone(base_dir, nickname, domain) delete_post_str += \ individual_post_as_html(signing_priv_key_pem, True, recent_posts_cache, max_recent_posts, @@ -79,7 +81,7 @@ def html_confirm_delete(css_cache: {}, peertube_instances, allow_local_network_access, theme_name, system_language, max_like_count, False, False, False, False, False, False, - cw_lists, lists_enabled) + cw_lists, lists_enabled, timezone) delete_post_str += '
' delete_post_str += \ '

' + \ diff --git a/webapp_create_post.py b/webapp_create_post.py index dd39ad58e..7157adebd 100644 --- a/webapp_create_post.py +++ b/webapp_create_post.py @@ -17,6 +17,7 @@ from utils import get_config_param from utils import acct_dir from utils import get_currencies from utils import get_category_types +from utils import get_account_timezone from webapp_utils import get_banner_file from webapp_utils import html_header_with_external_style from webapp_utils import html_footer @@ -259,6 +260,8 @@ def html_new_post(css_cache: {}, media_instance: bool, translate: {}, 'target="_blank">' + \ translate['this post'] + '

\n' if post_json_object: + timezone = \ + get_account_timezone(base_dir, nickname, domain) new_post_text += \ individual_post_as_html(signing_priv_key_pem, True, recent_posts_cache, @@ -282,7 +285,8 @@ def html_new_post(css_cache: {}, media_instance: bool, translate: {}, max_like_count, False, False, False, False, False, False, - cw_lists, lists_enabled) + cw_lists, lists_enabled, + timezone) reply_str = '\n' diff --git a/webapp_frontscreen.py b/webapp_frontscreen.py index d410b9bed..1d135d5eb 100644 --- a/webapp_frontscreen.py +++ b/webapp_frontscreen.py @@ -11,6 +11,7 @@ import os from utils import is_system_account from utils import get_domain_from_actor from utils import get_config_param +from utils import get_account_timezone from person import person_box_json from webapp_utils import html_header_with_external_style from webapp_utils import html_footer @@ -63,6 +64,7 @@ def _html_front_screen_posts(recent_posts_cache: {}, max_recent_posts: int, break for item in outbox_feed['orderedItems']: if item['type'] == 'Create': + timezone = get_account_timezone(base_dir, nickname, domain) post_str = \ individual_post_as_html(signing_priv_key_pem, True, recent_posts_cache, @@ -84,7 +86,8 @@ def _html_front_screen_posts(recent_posts_cache: {}, max_recent_posts: int, max_like_count, False, False, False, True, False, False, - cw_lists, lists_enabled) + cw_lists, lists_enabled, + timezone) if post_str: profile_str += post_str + separator_str ctr += 1 diff --git a/webapp_moderation.py b/webapp_moderation.py index 32096c960..596426636 100644 --- a/webapp_moderation.py +++ b/webapp_moderation.py @@ -54,7 +54,8 @@ def html_moderation(css_cache: {}, default_timeline: str, max_like_count: int, shared_items_federated_domains: [], signing_priv_key_pem: str, - cw_lists: {}, lists_enabled: str) -> str: + cw_lists: {}, lists_enabled: str, + timezone: str) -> str: """Show the moderation feed as html This is what you see when selecting the "mod" timeline """ @@ -79,7 +80,8 @@ def html_moderation(css_cache: {}, default_timeline: str, peertube_instances, allow_local_network_access, text_mode_banner, access_keys, system_language, max_like_count, shared_items_federated_domains, - signing_priv_key_pem, cw_lists, lists_enabled) + signing_priv_key_pem, cw_lists, lists_enabled, + timezone) def html_account_info(css_cache: {}, translate: {}, diff --git a/webapp_post.py b/webapp_post.py index c645a30fe..c82dc0257 100644 --- a/webapp_post.py +++ b/webapp_post.py @@ -23,6 +23,7 @@ from posts import post_is_muted from posts import get_person_box from posts import download_announce from posts import populate_replies_json +from utils import convert_published_to_local_timezone from utils import remove_hash_from_post_id from utils import remove_html from utils import get_actor_languages_list @@ -841,7 +842,8 @@ def _get_delete_icon_html(nickname: str, domain_full: str, def _get_published_date_str(post_json_object: {}, - show_published_date_only: bool) -> str: + show_published_date_only: bool, + timezone: str) -> str: """Return the html for the published date on a post """ published_str = '' @@ -862,6 +864,11 @@ def _get_published_date_str(post_json_object: {}, published_str = \ published_str.replace('T', ' ').split('.')[0] datetime_object = parse(published_str) + + # convert to local time + datetime_object = \ + convert_published_to_local_timezone(datetime_object, timezone) + if not show_published_date_only: published_str = datetime_object.strftime("%a %b %d, %H:%M") else: @@ -1366,7 +1373,8 @@ def individual_post_as_html(signing_priv_key_pem: str, store_to_cache: bool, use_cache_only: bool, cw_lists: {}, - lists_enabled: str) -> str: + lists_enabled: str, + timezone: str) -> str: """ Shows a single post as html """ if not post_json_object: @@ -1803,7 +1811,8 @@ def individual_post_as_html(signing_priv_key_pem: str, bookmark_str, delete_str, mute_str) published_str = \ - _get_published_date_str(post_json_object, show_published_date_only) + _get_published_date_str(post_json_object, show_published_date_only, + timezone) _log_post_timing(enable_timing_log, post_start_time, '15') @@ -2038,7 +2047,8 @@ def html_individual_post(css_cache: {}, allow_local_network_access: bool, theme_name: str, system_language: str, max_like_count: int, signing_priv_key_pem: str, - cw_lists: {}, lists_enabled: str) -> str: + cw_lists: {}, lists_enabled: str, + timezone: str) -> str: """Show an individual post as html """ original_post_json = post_json_object @@ -2104,7 +2114,7 @@ def html_individual_post(css_cache: {}, allow_local_network_access, theme_name, system_language, max_like_count, False, authorized, False, False, False, False, - cw_lists, lists_enabled) + cw_lists, lists_enabled, timezone) message_id = remove_id_ending(post_json_object['id']) # show the previous posts @@ -2139,7 +2149,8 @@ def html_individual_post(css_cache: {}, max_like_count, False, authorized, False, False, False, False, - cw_lists, lists_enabled) + post_str + cw_lists, lists_enabled, + timezone) + post_str # show the following posts post_filename = locate_post(base_dir, nickname, domain, message_id) @@ -2176,7 +2187,8 @@ def html_individual_post(css_cache: {}, max_like_count, False, authorized, False, False, False, False, - cw_lists, lists_enabled) + cw_lists, lists_enabled, + timezone) css_filename = base_dir + '/epicyon-profile.css' if os.path.isfile(base_dir + '/epicyon.css'): css_filename = base_dir + '/epicyon.css' @@ -2203,7 +2215,8 @@ def html_post_replies(css_cache: {}, theme_name: str, system_language: str, max_like_count: int, signing_priv_key_pem: str, cw_lists: {}, - lists_enabled: str) -> str: + lists_enabled: str, + timezone: str) -> str: """Show the replies to an individual post as html """ replies_str = '' @@ -2228,7 +2241,8 @@ def html_post_replies(css_cache: {}, max_like_count, False, False, False, False, False, False, - cw_lists, lists_enabled) + cw_lists, lists_enabled, + timezone) css_filename = base_dir + '/epicyon-profile.css' if os.path.isfile(base_dir + '/epicyon.css'): @@ -2257,7 +2271,8 @@ def html_emoji_reaction_picker(css_cache: {}, theme_name: str, system_language: str, max_like_count: int, signing_priv_key_pem: str, cw_lists: {}, lists_enabled: str, - box_name: str, page_number: int) -> str: + box_name: str, page_number: int, + timezone: str) -> str: """Returns the emoji picker screen """ reacted_to_post_str = \ @@ -2280,7 +2295,7 @@ def html_emoji_reaction_picker(css_cache: {}, theme_name, system_language, max_like_count, False, False, False, False, False, False, - cw_lists, lists_enabled) + cw_lists, lists_enabled, timezone) reactions_filename = base_dir + '/emoji/reactions.json' if not os.path.isfile(reactions_filename): diff --git a/webapp_profile.py b/webapp_profile.py index 4ce7c4e84..94cef5374 100644 --- a/webapp_profile.py +++ b/webapp_profile.py @@ -142,7 +142,8 @@ def html_profile_after_search(css_cache: {}, system_language: str, max_like_count: int, signing_priv_key_pem: str, - cw_lists: {}, lists_enabled: str) -> str: + cw_lists: {}, lists_enabled: str, + timezone: str) -> str: """Show a profile page after a search for a fediverse address """ http = False @@ -354,7 +355,8 @@ def html_profile_after_search(css_cache: {}, max_like_count, False, False, False, False, False, False, - cw_lists, lists_enabled) + cw_lists, lists_enabled, + timezone) i += 1 if i >= 8: break @@ -576,7 +578,8 @@ def html_profile(signing_priv_key_pem: str, extraJson: {}, page_number: int, max_items_per_page: int, cw_lists: {}, lists_enabled: str, - content_license_url: str) -> str: + content_license_url: str, + timezone: str) -> str: """Show the profile page as html """ nickname = profile_json['preferredUsername'] @@ -986,7 +989,8 @@ def html_profile(signing_priv_key_pem: str, theme, system_language, max_like_count, signing_priv_key_pem, - cw_lists, lists_enabled) + license_str + cw_lists, lists_enabled, + timezone) + license_str if not is_group: if selected == 'following': profile_str += \ @@ -1059,7 +1063,8 @@ def _html_profile_posts(recent_posts_cache: {}, max_recent_posts: int, theme_name: str, system_language: str, max_like_count: int, signing_priv_key_pem: str, - cw_lists: {}, lists_enabled: str) -> str: + cw_lists: {}, lists_enabled: str, + timezone: str) -> str: """Shows posts on the profile screen These should only be public posts """ @@ -1107,7 +1112,8 @@ def _html_profile_posts(recent_posts_cache: {}, max_recent_posts: int, max_like_count, False, False, False, True, False, False, - cw_lists, lists_enabled) + cw_lists, lists_enabled, + timezone) if post_str: profile_str += post_str + separator_str ctr += 1 diff --git a/webapp_search.py b/webapp_search.py index 4f8092e03..712c0329c 100644 --- a/webapp_search.py +++ b/webapp_search.py @@ -610,7 +610,8 @@ def html_history_search(css_cache: {}, translate: {}, base_dir: str, max_like_count: int, signing_priv_key_pem: str, cw_lists: {}, - lists_enabled: str) -> str: + lists_enabled: str, + timezone: str) -> str: """Show a page containing search results for your post history """ if historysearch.startswith("'"): @@ -697,7 +698,8 @@ def html_history_search(css_cache: {}, translate: {}, base_dir: str, show_individual_post_icons, show_individual_post_icons, False, False, False, False, - cw_lists, lists_enabled) + cw_lists, lists_enabled, + timezone) if post_str: history_search_form += separator_str + post_str index += 1 @@ -722,7 +724,8 @@ def html_hashtag_search(css_cache: {}, theme_name: str, system_language: str, max_like_count: int, signing_priv_key_pem: str, - cw_lists: {}, lists_enabled: str) -> str: + cw_lists: {}, lists_enabled: str, + timezone: str) -> str: """Show a page containing search results for a hashtag or after selecting a hashtag from the swarm """ @@ -882,7 +885,7 @@ def html_hashtag_search(css_cache: {}, manually_approves_followers, show_public_only, store_to_sache, False, cw_lists, - lists_enabled) + lists_enabled, timezone) if post_str: hashtag_search_form += separator_str + post_str index += 1 diff --git a/webapp_timeline.py b/webapp_timeline.py index 187d5c9d8..47d18b765 100644 --- a/webapp_timeline.py +++ b/webapp_timeline.py @@ -454,7 +454,8 @@ def html_timeline(css_cache: {}, default_timeline: str, max_like_count: int, shared_items_federated_domains: [], signing_priv_key_pem: str, - cw_lists: {}, lists_enabled: str) -> str: + cw_lists: {}, lists_enabled: str, + timezone: str) -> str: """Show the timeline as html """ enable_timing_log = False @@ -930,7 +931,8 @@ def html_timeline(css_cache: {}, default_timeline: str, show_individual_post_icons, manually_approve_followers, False, True, use_cache_only, - cw_lists, lists_enabled) + cw_lists, lists_enabled, + timezone) _log_timeline_timing(enable_timing_log, timeline_start_time, box_name, '12') @@ -1158,7 +1160,8 @@ def html_shares(css_cache: {}, default_timeline: str, max_like_count: int, shared_items_federated_domains: [], signing_priv_key_pem: str, - cw_lists: {}, lists_enabled: str) -> str: + cw_lists: {}, lists_enabled: str, + timezone: str) -> str: """Show the shares timeline as html """ manually_approve_followers = \ @@ -1188,7 +1191,7 @@ def html_shares(css_cache: {}, default_timeline: str, access_keys, system_language, max_like_count, shared_items_federated_domains, signing_priv_key_pem, - cw_lists, lists_enabled) + cw_lists, lists_enabled, timezone) def html_wanted(css_cache: {}, default_timeline: str, @@ -1216,7 +1219,8 @@ def html_wanted(css_cache: {}, default_timeline: str, max_like_count: int, shared_items_federated_domains: [], signing_priv_key_pem: str, - cw_lists: {}, lists_enabled: str) -> str: + cw_lists: {}, lists_enabled: str, + timezone: str) -> str: """Show the wanted timeline as html """ manually_approve_followers = \ @@ -1246,7 +1250,7 @@ def html_wanted(css_cache: {}, default_timeline: str, access_keys, system_language, max_like_count, shared_items_federated_domains, signing_priv_key_pem, - cw_lists, lists_enabled) + cw_lists, lists_enabled, timezone) def html_inbox(css_cache: {}, default_timeline: str, @@ -1275,7 +1279,8 @@ def html_inbox(css_cache: {}, default_timeline: str, max_like_count: int, shared_items_federated_domains: [], signing_priv_key_pem: str, - cw_lists: {}, lists_enabled: str) -> str: + cw_lists: {}, lists_enabled: str, + timezone: str) -> str: """Show the inbox as html """ manually_approve_followers = \ @@ -1305,7 +1310,7 @@ def html_inbox(css_cache: {}, default_timeline: str, access_keys, system_language, max_like_count, shared_items_federated_domains, signing_priv_key_pem, - cw_lists, lists_enabled) + cw_lists, lists_enabled, timezone) def html_bookmarks(css_cache: {}, default_timeline: str, @@ -1334,7 +1339,8 @@ def html_bookmarks(css_cache: {}, default_timeline: str, max_like_count: int, shared_items_federated_domains: [], signing_priv_key_pem: str, - cw_lists: {}, lists_enabled: str) -> str: + cw_lists: {}, lists_enabled: str, + timezone: str) -> str: """Show the bookmarks as html """ manually_approve_followers = \ @@ -1363,7 +1369,7 @@ def html_bookmarks(css_cache: {}, default_timeline: str, allow_local_network_access, text_mode_banner, access_keys, system_language, max_like_count, shared_items_federated_domains, signing_priv_key_pem, - cw_lists, lists_enabled) + cw_lists, lists_enabled, timezone) def html_inbox_dms(css_cache: {}, default_timeline: str, @@ -1392,7 +1398,8 @@ def html_inbox_dms(css_cache: {}, default_timeline: str, max_like_count: int, shared_items_federated_domains: [], signing_priv_key_pem: str, - cw_lists: {}, lists_enabled: str) -> str: + cw_lists: {}, lists_enabled: str, + timezone: str) -> str: """Show the DM timeline as html """ artist = is_artist(base_dir, nickname) @@ -1417,7 +1424,7 @@ def html_inbox_dms(css_cache: {}, default_timeline: str, access_keys, system_language, max_like_count, shared_items_federated_domains, signing_priv_key_pem, - cw_lists, lists_enabled) + cw_lists, lists_enabled, timezone) def html_inbox_replies(css_cache: {}, default_timeline: str, @@ -1446,7 +1453,8 @@ def html_inbox_replies(css_cache: {}, default_timeline: str, max_like_count: int, shared_items_federated_domains: [], signing_priv_key_pem: str, - cw_lists: {}, lists_enabled: str) -> str: + cw_lists: {}, lists_enabled: str, + timezone: str) -> str: """Show the replies timeline as html """ artist = is_artist(base_dir, nickname) @@ -1470,7 +1478,7 @@ def html_inbox_replies(css_cache: {}, default_timeline: str, allow_local_network_access, text_mode_banner, access_keys, system_language, max_like_count, shared_items_federated_domains, signing_priv_key_pem, - cw_lists, lists_enabled) + cw_lists, lists_enabled, timezone) def html_inbox_media(css_cache: {}, default_timeline: str, @@ -1499,7 +1507,8 @@ def html_inbox_media(css_cache: {}, default_timeline: str, max_like_count: int, shared_items_federated_domains: [], signing_priv_key_pem: str, - cw_lists: {}, lists_enabled: str) -> str: + cw_lists: {}, lists_enabled: str, + timezone: str) -> str: """Show the media timeline as html """ artist = is_artist(base_dir, nickname) @@ -1523,7 +1532,7 @@ def html_inbox_media(css_cache: {}, default_timeline: str, allow_local_network_access, text_mode_banner, access_keys, system_language, max_like_count, shared_items_federated_domains, signing_priv_key_pem, - cw_lists, lists_enabled) + cw_lists, lists_enabled, timezone) def html_inbox_blogs(css_cache: {}, default_timeline: str, @@ -1552,7 +1561,8 @@ def html_inbox_blogs(css_cache: {}, default_timeline: str, max_like_count: int, shared_items_federated_domains: [], signing_priv_key_pem: str, - cw_lists: {}, lists_enabled: str) -> str: + cw_lists: {}, lists_enabled: str, + timezone: str) -> str: """Show the blogs timeline as html """ artist = is_artist(base_dir, nickname) @@ -1576,7 +1586,7 @@ def html_inbox_blogs(css_cache: {}, default_timeline: str, allow_local_network_access, text_mode_banner, access_keys, system_language, max_like_count, shared_items_federated_domains, signing_priv_key_pem, - cw_lists, lists_enabled) + cw_lists, lists_enabled, timezone) def html_inbox_features(css_cache: {}, default_timeline: str, @@ -1606,7 +1616,8 @@ def html_inbox_features(css_cache: {}, default_timeline: str, max_like_count: int, shared_items_federated_domains: [], signing_priv_key_pem: str, - cw_lists: {}, lists_enabled: str) -> str: + cw_lists: {}, lists_enabled: str, + timezone: str) -> str: """Show the features timeline as html """ return html_timeline(css_cache, default_timeline, @@ -1629,7 +1640,7 @@ def html_inbox_features(css_cache: {}, default_timeline: str, allow_local_network_access, text_mode_banner, access_keys, system_language, max_like_count, shared_items_federated_domains, signing_priv_key_pem, - cw_lists, lists_enabled) + cw_lists, lists_enabled, timezone) def html_inbox_news(css_cache: {}, default_timeline: str, @@ -1658,7 +1669,8 @@ def html_inbox_news(css_cache: {}, default_timeline: str, max_like_count: int, shared_items_federated_domains: [], signing_priv_key_pem: str, - cw_lists: {}, lists_enabled: str) -> str: + cw_lists: {}, lists_enabled: str, + timezone: str) -> str: """Show the news timeline as html """ return html_timeline(css_cache, default_timeline, @@ -1681,7 +1693,7 @@ def html_inbox_news(css_cache: {}, default_timeline: str, allow_local_network_access, text_mode_banner, access_keys, system_language, max_like_count, shared_items_federated_domains, signing_priv_key_pem, - cw_lists, lists_enabled) + cw_lists, lists_enabled, timezone) def html_outbox(css_cache: {}, default_timeline: str, @@ -1710,7 +1722,8 @@ def html_outbox(css_cache: {}, default_timeline: str, max_like_count: int, shared_items_federated_domains: [], signing_priv_key_pem: str, - cw_lists: {}, lists_enabled: str) -> str: + cw_lists: {}, lists_enabled: str, + timezone: str) -> str: """Show the Outbox as html """ manually_approve_followers = \ @@ -1736,4 +1749,4 @@ def html_outbox(css_cache: {}, default_timeline: str, allow_local_network_access, text_mode_banner, access_keys, system_language, max_like_count, shared_items_federated_domains, signing_priv_key_pem, - cw_lists, lists_enabled) + cw_lists, lists_enabled, timezone)