mirror of https://gitlab.com/litecord/litecord.git
storage: append '+00:00' to timestamps
This commit is contained in:
parent
10d4771c0c
commit
ee29668468
|
|
@ -30,7 +30,7 @@ def str_(val):
|
||||||
|
|
||||||
|
|
||||||
def timestamp_(dt):
|
def timestamp_(dt):
|
||||||
return dt.isoformat() if dt else None
|
return f'{dt.isoformat()}+00:00' if dt else None
|
||||||
|
|
||||||
|
|
||||||
async def _set_json(con):
|
async def _set_json(con):
|
||||||
|
|
@ -188,7 +188,7 @@ class Storage:
|
||||||
# the user since it is known that everyone has
|
# the user since it is known that everyone has
|
||||||
# that role.
|
# that role.
|
||||||
'roles': roles,
|
'roles': roles,
|
||||||
'joined_at': row['joined_at'].isoformat(),
|
'joined_at': timestamp_(row['joined_at']),
|
||||||
'deaf': row['deafened'],
|
'deaf': row['deafened'],
|
||||||
'mute': row['muted'],
|
'mute': row['muted'],
|
||||||
}
|
}
|
||||||
|
|
@ -483,7 +483,7 @@ class Storage:
|
||||||
WHERE guild_id = $1 AND user_id = $2
|
WHERE guild_id = $1 AND user_id = $2
|
||||||
""", guild_id, user_id)
|
""", guild_id, user_id)
|
||||||
|
|
||||||
res['joined_at'] = joined_at.isoformat()
|
res['joined_at'] = timestamp_(joined_at.isoformat())
|
||||||
|
|
||||||
members = await self.get_member_data(guild_id)
|
members = await self.get_member_data(guild_id)
|
||||||
channels = await self.get_channel_data(guild_id)
|
channels = await self.get_channel_data(guild_id)
|
||||||
|
|
@ -633,7 +633,7 @@ class Storage:
|
||||||
|
|
||||||
res = dict(row)
|
res = dict(row)
|
||||||
res['nonce'] = str(res['nonce'])
|
res['nonce'] = str(res['nonce'])
|
||||||
res['timestamp'] = res['timestamp'].isoformat()
|
res['timestamp'] = timestamp_(res['timestamp'])
|
||||||
res['edited_timestamp'] = timestamp_(res['edited_timestamp'])
|
res['edited_timestamp'] = timestamp_(res['edited_timestamp'])
|
||||||
|
|
||||||
res['type'] = res['message_type']
|
res['type'] = res['message_type']
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue