Modified created at function to output date time and time zone

This commit is contained in:
2024-07-01 16:19:28 +02:00
parent c074e45892
commit ba6d89d8e1

View File

@ -103,7 +103,8 @@ def created_at():
now_tz_aware = now.astimezone()
tz = now_tz_aware.strftime('%z')
#created_at = now_tz_aware.strftime('%Y-%m-%d_%H-%M-%S')+'_utcoffset_' + tz
created_at = now_tz_aware.strftime('%Y-%m-%d')+'_UTC-OFST_' + tz
#created_at = now_tz_aware.strftime('%Y-%m-%d')+'_UTC-OFST_' + tz
created_at = now_tz_aware.strftime('%Y-%m-%d %H:%M:%S') +'_UTC-OFST_' + tz
# Make created at timestamp with tz information
#created_at = now.isoformat()
return created_at