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
Post a Comment