In my Java Script app I have the date stored in a format like so:
2011-09-24
Now when I try using the above value to create a new Date obje
You can convert this date to UTC date by
new Date(Date.UTC(Year, Month, Day, Hour, Minute, Second))
And it is always recommended to use UTC (universal time zone) date instead of Date with local time, as by default dates are stored in Database with UTC. So, it is good practice to use and interpret dates in UTC format throughout entire project. For example,
Date.getUTCYear(), getUTCMonth(), getUTCDay(), getUTCHours()
So, using UTC dates solves all the problem related to timezone issues.