Main.java Source code

Java tutorial

Introduction

Here is the source code for Main.java

Source

//package com.java2s;

import java.util.TimeZone;

public class Main {
    /**
     * Get the timezone
     * 
     * @return
     */
    public static String getTimeZone() {
        int time_zone = TimeZone.getDefault().getRawOffset() / 1000 / 3600;
        if (time_zone > 0)
            return "+" + time_zone;
        else
            return time_zone + "";

    }
}