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

iphone - Three second countdown in cocos2d -

hyperlink - how to do url routing in php -

c - Avoiding Extra Malloc in Linked List (node->next = NULL) -