android - timezone and daylight savings -


hi need timezone of person display info depending on timezone: i'm gonna use is:

  timezone tz = cal.gettimezone(); 

but timezone change when there's daylight savings? , if need timezone of location daylight savings ruine result?

you can use figure out if you're in dst:

boolean isdst = tz.indaylighttime(time); 

and can use figure out how time add in milliseconds (some places use dst times different 1 hour):

int dstmillisec = tz.getdstsavings(); 

hope helps :)


Comments

Popular posts from this blog

java.util.scanner - How to read and add only numbers to array from a text file -

rewrite - Trouble with Wordpress multiple custom querystrings -