Switch date formats to ISO 8601

both for the export folder name and the time stamp of the messages in the channel/conversation file. 

Relevant XKCD: https://xkcd.com/1179/
This commit is contained in:
David Fichtmueller 2023-11-08 12:49:15 +01:00 committed by GitHub
parent d98d00f36b
commit 10ae14bb89
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -340,7 +340,7 @@ def parse_channel_history(msgs, users, check_thread=False):
usr = {"name": "", "real_name": "none"}
timestamp = datetime.fromtimestamp(round(float(msg["ts"]))).strftime(
"%m-%d-%y %H:%M:%S"
"%Y-%m-%d %H:%M:%S"
)
text = msg["text"] if msg["text"].strip() != "" else "[no message content]"
for u in [x["id"] for x in users]:
@ -484,7 +484,7 @@ if __name__ == "__main__":
)
a = parser.parse_args()
ts = str(datetime.strftime(datetime.now(), "%m-%d-%Y_%H%M%S"))
ts = str(datetime.strftime(datetime.now(), "%Y-%m-%d_%H%M%S"))
sep_str = "*" * 24
if a.o is None and a.files: