經安全檢測,此網站為安全網站,請放心前往原始網址!

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

網址安全性掃描由 google 提供