Java TimeZone Usage findTimeZoneInDate(String date)

Here you can find the source of findTimeZoneInDate(String date)

Description

find Time Zone In Date

License

Open Source License

Declaration

public static final TimeZone findTimeZoneInDate(String date) 

Method Source Code

//package com.java2s;

import java.util.TimeZone;

public class Main {
    public static final TimeZone findTimeZoneInDate(String date) {
        StringBuilder sb = new StringBuilder();
        StringBuilder dateBuilder = new StringBuilder(date.trim()).reverse();
        int index = 0;
        char c;// w  w  w  .  ja v  a2s.  c om
        while ((c = dateBuilder.charAt(index++)) != ' ') {
            sb.append(c);
        }
        TimeZone timezone = TimeZone.getTimeZone(sb.reverse().toString());
        return timezone;
    }
}

Related

  1. buildTimezone(int hours, int minutes)
  2. computeTimeZoneOffsetInHours(TimeZone timeZone, long currentDatetime)
  3. createPostgresTimeZone()
  4. createTaiTimeZone(int leapSecs)
  5. datePlusDays(Date date, int days)
  6. isInEasternEightZones()
  7. isKeepTimeZone(TimeZone tz)
  8. isSameDayOfMillis(final long ms1, final long ms2)
  9. isTimeZoneDisponible(TimeZone timeZone)