Before JDK 8, a time zone can be defined via java.util.TimeZone. With this time zone, the code can obtain the zone offset via the TimeZone.getRawOffset() method (the raw part comes from the fact that this method doesn't take into account Daylight Saving Time). The code that is bundled to this book contains this solution.