7
Eldius
3y

I just came with a problem trying to get the value of an HTML input of type date and trying to throw it into a Javascript Date object... After about an hour of searching (Google, Stackoverflow) I realized HTML5 date inputs use UTC timezone (defined by W3C) and Javascript uses your local timezone and this difference is messing with my code giving me a JS obvject 1 day before the HTML date...
Why they do this kind of thing?

Comments
  • 2
    Can you imagine if they actually made all web languages work consistently with each other?..... no we couldn't do that, that would make using them all together easy and we can't have that!!

    As for the JS date, you just need to state the time zone in the date object
  • 1
    Speaking of JS date, I spent hours trying to fix a problem and when I finally solved the problem it was Y2K... In 2017 😑. Goddam getYear();
Add Comment