 |
timezone - How to get UTC offset in seconds in android - Stack Overflow
I'm trying to get the UTC offset in seconds in android. Since the emulator keeps returning 0, I can't tell if I'm doing this correctly or not. Calendar c=Calendar.getInstance(); TimeZone tz=c.getTimeZone(); int offsetFromUtc=tz.getOffset(0)/1000; When I p
stackoverflow.com |
 |