Am working on a front end which lets people search availability between certain dates. Now, if someone in Europe selects, for example, 30/12/2019 and his local time is a couple of minutes after midnight, does this affect in any way how this date is interpreted on the backend if the server time is, for instance, UTC -3?
Other one: I have the impression that Wix Dates are stored in UTC in db. Is this true?
You’ll need to take care of time zones in order to properly display the correct times. A search on the subject should provide you with the info needed.
Using the UTC variant of the Date functions can be the cause of the difference in data. Refer to https://javascript.info/date for details.
The most common problem with this is keeping track of UTC versus local time zone.
You can check your date/time using console.log() statements.
You can get rid of the UTC and use standard Date functions if that’s your goal.
Make a Function that will take a date and return it in the format you need and run all date outputs through that function.
Also take a look at the article the advice in the article How to Display Today’s Date on Your Site & https://support.wix.com/en/article/corvid-scheduling-recurring-jobs#time-string + forum posts: