I have the following string that I implicitly know is in UTC timezone: 2008-03-09 18:02:29
How can I use moment.js to convert it to an object in my local timezone?
I tried the following but it doesn't adjust the time for my local timezone:
> moment("2008-03-09 18:02:29 UTC").format('YYYY-MM-DD HH:mm:ss zz')
"2008-03-09 18:02:29"
PS. I live near Washington DC (UTC -4). But this needs to work properly for any user from anywhere in the world.
I can do it without moment.js like this (but it only works in Chrome, not FF):
new Date('2008-03-09 18:02:29 UTC');
So what's the moment.js code analogous to this??