Hello,
I have a from and to calendar date selector in my website. A display button is used to display the date selected by the user in the console(for testing ) when it is clicked. But whenever i click the display button, the date 1 day earlier to the selected date is displayed in the console. is it a bug? or am I doing anything wrong with my time zone and location settings in wix?
We have forwarded the information to the relevant department and they are investigating this matter. Meanwhile, you can use the following code to preview the relevant date when console log:
Hey, I have also some date / time issues. I get a string value with the value of “2017-11-11 13:30” and then I do like this to create a real date object before inserting it into my collection in WIX.
“eventDate”: new Date(entry.start_time),
When I run the code it changes all time values to one hour after “2017-11-11 14:30” the hour format in the string. How is this possible? Does all date / time handling on your servers executes from Amazon Cloud Data Centers maybe? So we need to be able to zero out this or set our own timezone in code in an easy way.
I’m not sure that I fully understand what is the exact scenario. Please provide us with the code and screenshots of the issue so that we can better understand what you were referring.
If I have a string called newDate and store a date / time value in that string with the value of 2017-12-01 20:00 and then I have to convert it into a real date object to store it into WIX Data Collection as below.
let dateToStore = new Date(newDate);
The new value of dateToStore will now hold the correct date BUT the time will be 1 hour wrong, how can this happen? Does it get affected by some timezone changes automatically?
Hello, I have a from and to calendar date selector in my website. A display button is used to display the date selected by the user in the console(for testing ) when it is clicked. But whenever i click the display button, the date 1 day earlier to the selected date is displayed in the console. is it a bug? or am I doing anything wrong with my time zone and location settings in wix?
I spoke with one of the developers and we narrowed down the problem to your exact situation: viewing the date in the Wix Developer Console while previewing the page. If you viewed it in the browser console in either the previewed page or the published page, the date is printed correctly there. Or, for example, if you assign the date to a text field, it will work fine there too, e.g.
I am experiencing this same issue now as well. When a user chooses a date in any date picker and then that date is saved in a collection to a pure date field , the date will be saved as 1 day earlier.
However, if I choose the option in the date field settings in the collection to “include time field”, then the date is saved correctly.
I am seeing the exact same behavior as @holowinsky, I can sometimes get the correct value by selecting different days.
I’m using the input to insert a record directly via a Dataset. I was really hoping to avoid recreating all that functionality in Velo to get it to behave correctly.