Vercel Date Issue

understand that Vercel servers have different dates compared to the client's date. Typically, this is resolved by marking a component as 'use client' to generate dates on the client side. However, I'm encountering an issue with my app's calendar feature. When the client sends a date to the server to fetch events, there's a discrepancy between the client's date and the server's date. This leads to events not being displayed correctly. For example, if I request events for April 11th, but the event's date in the database falls between 5:29 AM and 11:59 PM, it won't be displayed for that day. However, if the client's date is April 10th, then the event shows up. Events with dates between 12:00 AM and 5:29 AM work fine. Essentially, there's a 5 and a half hour gap causing this issue. You can see the problem by visiting this link: https://scribe-rho.vercel.app/calendar. To begin testing, please sign up if you haven't already, then navigate to the '/calendar' page. Create two events: one scheduled between 12:00 AM and 5:29 AM, and another scheduled between 5:30 AM and 11:59 PM. I've also attached some images for reference.
No description
No description
No description
0 Replies
No replies yetBe the first to reply to this messageJoin
Want results from more Discord servers?
Add your server