made Javascript date parsing more robust for time zones