Cannot schedule event in the past

I gave this argument when creating my scheduled event:
scheduledStartTime: timestamp
scheduledStartTime: timestamp
The bot wrote this date in the message in my guild:
Saturday, 26 August 2023 15:00
Saturday, 26 August 2023 15:00
That is in a few minutes for me in my timezone, so it should be in the future. However, in my console, a completely wrong date is being sent to the API:
scheduled_start_time: '1970-01-20T14:17:34.800Z'
scheduled_start_time: '1970-01-20T14:17:34.800Z'
And thus I'm getting the following error:
scheduled_start_time[GUILD_SCHEDULED_EVENT_SCHEDULE_PAST]: Cannot schedule event in the past.
scheduled_start_time[GUILD_SCHEDULED_EVENT_SCHEDULE_PAST]: Cannot schedule event in the past.
4 Replies
chewie
chewie17mo ago
is the timestamp in milliseconds?
Mat
MatOP17mo ago
Probably not. I can try multiplying * 1000 to it. Ok, now it's showing the right date at least, using this timestamp for half an hour into the future: 1693058400 * 1000:
scheduled_start_time: '2023-08-26T14:00:00.000Z',
scheduled_start_time: '2023-08-26T14:00:00.000Z',
But it doesn't look like my timezone. Looks like GMT (I'm in GMT+2). I don't know if that matters? I used a timestamp, so I'd assume that would be the same value for all timezones? Oh, wait. I'm dumb. This was hald an hour ago lol. It works! Thanks for the hint! (Now, how do I mark this as solved lol?) @Danial This post too.
chewie
chewie17mo ago
I see the bot doesnt bot anymore SCWhehehehehe
Danial
Danial17mo ago
Yeah, the bot was offline when this was opened so it doesn't have the starter message
Want results from more Discord servers?
Add your server