From 62aad10008b097398cd4815344d6dcb5877289d2 Mon Sep 17 00:00:00 2001 From: Draper <27962761+Drapersniper@users.noreply.github.com> Date: Mon, 6 Jan 2020 10:28:56 +0000 Subject: [PATCH] [3.2][Audio] Database migration fix (#3275) * Missed this due to the mess of a fork i had * chore --- changelog.d/audio/3275.misc.1.rst | 1 + redbot/cogs/audio/audio.py | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) create mode 100644 changelog.d/audio/3275.misc.1.rst diff --git a/changelog.d/audio/3275.misc.1.rst b/changelog.d/audio/3275.misc.1.rst new file mode 100644 index 000000000..ae239933b --- /dev/null +++ b/changelog.d/audio/3275.misc.1.rst @@ -0,0 +1 @@ +Change timestamp from TEXt to INT during migration \ No newline at end of file diff --git a/redbot/cogs/audio/audio.py b/redbot/cogs/audio/audio.py index f9b7211d9..958f6f6f6 100644 --- a/redbot/cogs/audio/audio.py +++ b/redbot/cogs/audio/audio.py @@ -217,7 +217,7 @@ class Audio(commands.Cog): async def _migrate_config(self, from_version: int, to_version: int) -> None: database_entries = [] - time_now = str(datetime.datetime.now(datetime.timezone.utc)) + time_now = int(datetime.datetime.now(datetime.timezone.utc).timestamp()) if from_version == to_version: return if from_version < 2 <= to_version: