From 9be5b928d0c7ae2a15163cda425a588c2bb8f12d Mon Sep 17 00:00:00 2001 From: Bob Mottram Date: Thu, 10 Oct 2019 14:48:05 +0100 Subject: [PATCH] Get time zone --- posts.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/posts.py b/posts.py index 2405499f..6975fa38 100644 --- a/posts.py +++ b/posts.py @@ -17,6 +17,7 @@ import threading import sys import trace import time +from time import gmtime, strftime from collections import OrderedDict from threads import threadWithTrace from cache import storePersonInCache @@ -538,9 +539,9 @@ def createPostBase(baseDir: str,nickname: str, domain: str, port: int, \ if eventTime.endswith('Z'): eventDateStr=eventDate+'T'+eventTime else: - eventDateStr=eventDate+'T'+eventTime+':00Z' + eventDateStr=eventDate+'T'+eventTime+':00'+strftime("%z", gmtime()) else: - eventDateStr=eventDate+'T00:00:00Z' + eventDateStr=eventDate+'T12:00:00Z' tags.append({ "@context": "https://www.w3.org/ns/activitystreams", "type": "Event",