javascript date varies across timezone
<pre><code>var dt_now = '2-22-2013';//mm-dd-yyyy, this is dynamic in actual code
            dt_now = dt_now.split("-");
            dt_now = addZero(dt_now[2])+'-'+addZero(dt_now[0])+'-'+addZero(dt_now[1]);
            dt_now = new Date(dt_now);
</code></pre>

<p>I am using the above code to convert a user defined text to actual date for use in rest of my code. it seems to work ok for me but on another system which is situated in a different timezone(my time -12 hours), the date comes out as <code>February 21st</code> instead of <code>Feb 22nd</code>, that is, it is running <strong>one day behind the expected date</strong>. I have no idea how to fix this or what the error might be. Any suggestions?</p>
