I needed an offset that not only included the daylight, but also as a number. Here is the code I used if someone is looking for an example.
I get a response from "11" that I expect in NSW, Australia in the summer. I also needed it as a string, so I could send it to the server so you don't need the last line.
TimeZone tz = TimeZone.getDefault(); Date now = new Date(); int offsetFromUtc = tz.getOffset(now.getTime()) / 3600000; String m2tTimeZoneIs = Integer.toString(offsetFromUtc);
timv Nov 20 '13 at 1:10 2013-11-20 01:10
source share