dates are not same in server and client(dayjs)
this is giving output in client as
2023-08-07T13:00:00.000Z 2023-07-12T13:00:00.000Z
output in server
2023-08-07T18:30:00.000Z 2023-07-12T18:30:00.000Z
can anyone tell me why it is happening
8 Replies
timezone
also, you can check the relative time, in seconds, and check if they are the same
millisecond in client
1691413200000 1689166800000
millisecond in server
1691433000000 1689186600000
they are not same
js dates are a mess
can please help me how can solve this problem
you either compensate the date for both of them to use central time
or one of them will have to sync with the other
how can i do that?
from the looks of it
the difference is 5 hours
just add 5 hours in one side, or remove from the other
Okay thank you