Online Java Compiler By
JavaTpoint.com
import java.util.Date; public class JavaDateGetTimezoneOffsetExample1 { public static void main(String[] args) { Date d=new Date(); System.out.println("Current time-zone offset is : "+d.getTimezoneOffset()); } }
Output