Java ZoneId zoneId(Object zoneId)

Here you can find the source of zoneId(Object zoneId)

Description

zone Id

License

Apache License

Declaration

public static ZoneId zoneId(Object zoneId) 

Method Source Code


//package com.java2s;
//License from project: Apache License 

import java.time.ZoneId;
import java.time.ZoneOffset;

public class Main {
    public static ZoneId zoneId(Object zoneId) {
        if (zoneId == null) {
            return null;
        }//from ww w.ja  v  a 2s.  c  o  m
        return zoneId(zoneId.toString());
    }

    public static ZoneId zoneId(String zoneId) {
        return ZoneId.of(zoneId, ZoneId.SHORT_IDS);
    }

    public static ZoneId zoneId(ZoneOffset zoneOffset) {
        return zoneOffset;
    }
}

Related

  1. parseDateTime(String yyyymmdd, String hhmmss)
  2. parseDateToZdt(Date date)
  3. parseTimeZone(String timeZoneStr)
  4. slugifyDate(Long epochMillis)
  5. verifyZoneId(String zoneId)