Code example for TimeZone

Methods: getID

0
    /* (non-Javadoc) 
     * @see javax.xml.bind.annotation.adapters.XmlAdapter#marshal(java.lang.Object) 
     */ 
    @Override 
    public String marshal(TimeZone v) throws Exception {
        return v != null ? v.getID() : null;
    } 
 
    /* (non-Javadoc) 
     * @see javax.xml.bind.annotation.adapters.XmlAdapter#unmarshal(java.lang.Object) 
     */ 
    @Override 
    public TimeZone unmarshal(String v) throws Exception {
        return v != null ? TimeZone.getTimeZone(v) : null;
    } 
}