Java printing timezone with full text -


i wanted print "20130925 050054 america/new_york" dateformat, using following code print instead prints "20130925 050054 pdt". wondering, if "zzz" can changed print full name, "america/new_york"?

dateformat df = new simpledateformat("yyyymmdd hhmmss zzz"); df.settimezone(timezonefromconfigfile); string startdate=df.format(c.gettime()); 

perhaps work:

dateformat df = new simpledateformat("yyyymmdd hhmmss"); df.settimezone(timezonefromconfigfile); string startdate = df.format(c.gettime()) + " " + c.gettimezone().getid(); 

not sure if want middle line. should set in c instance of calendar already.


Comments

Popular posts from this blog

c# - How Configure Devart dotConnect for SQLite Code First? -

java - Copying object fields -

c++ - Clear the memory after returning a vector in a function -