I have a date type field, 2011-07-20 as a format example, that I need to convert to UTC for use in javascript. I know I can use Date.UTC in javascript but then the month is off by one and it doesn’t take the dashes as delimiters.
How do you convert the default rails date format to UTC?
In a controller
In a view