parsing - Java simple date formatter parse exception in remote machine -


in locale machine have code , executing fine..

dateformat stdf = new simpledateformat(                 "eee mmm dd yyyy hh:mm:ss zz (zzzz)");  string date = "sun mar 16 2014 10:30:00 gmt 0530 (india standard time)" calendar stcal = calendar.getinstance(); try {    stcal.settime(stdf.parse(date.replace("gmt ", "utc+"))); } catch (parseexception e) {     // todo auto-generated catch block     e.printstacktrace(); } 

but have running same code in remote machine in amazon server gives following parsing error,

java.text.parseexception: unparseable date: "sat march 15 2014 09:00:00 utc+1000<e. australia standard time>" 

update replace content below :

stcal.settime(stdf.parse(date.replace("gmt ", "utc +"))); 

Comments

Popular posts from this blog

Android layout hidden on keyboard show -

google app engine - 403 Forbidden POST - Flask WTForms -

c - Why would PK11_GenerateRandom() return an error -8023? -