Skip to content

Instantly share code, notes, and snippets.

@obiwong
Created November 25, 2013 14:40
Show Gist options
  • Save obiwong/7642180 to your computer and use it in GitHub Desktop.
Save obiwong/7642180 to your computer and use it in GitHub Desktop.
get time zone offset
import java.util.TimeZone;
public class Main {
public static void main(String[] args) {
System.out.println("tz: " + TimeZone.getDefault().getRawOffset() / (60 * 60 * 1000));
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment