android - Is setTimeZone method is device independent? -


my app heavily dependent on time. if set time zone using below code , user device time/date not set correctly work correctly , return correct time?

calendar calendar = calendar.getinstance();         simpledateformat sdf = new simpledateformat("dd-mmm-yyyy hh:mm:ss z");  sdf.settimezone(timezone.gettimezone("america/los_angeles")); 

this not if device time off. setting timezone, telling formatter display (what device thinks is) current time offset of +7/+8 hours.


Comments

Popular posts from this blog

c# - Send Image in Json : 400 Bad request -

jquery - Fancybox - apply a function to several elements -

An easy way to program an Android keyboard layout app -