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?

  • 1
    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
Add Comment