Code example for TimeZone

Methods: getDisplayName

0
Calendar now = Calendar.getInstance();
 
        // get current TimeZone using getTimeZone method of Calendar class 
        TimeZone timeZone = now.getTimeZone();
        return timeZone.getDisplayName();
    } 
 
    public static boolean checkInDatabase(Location l)
    { 
        boolean isSameLocation = false;
 
        return isSameLocation;
    } 
 
    public static long getDateTime(String date, String time) {
        SimpleDateFormat tf = new SimpleDateFormat("HH:mm:ss");
        SimpleDateFormat df = new SimpleDateFormat("yyyy/MM/dd");
        try { 
            // SimpleDateFormat dtf = new 
            // SimpleDateFormat("yyyy/MM/dd HH:mm:ss");