2011-05-08 42 views

回答

0

事實證明,將GData的TimeZoneProperty解析爲java.TimeZone非常簡單。

我給你留下解決它的代碼。

享受!

Mikywan。

public static TimeZone parse(TimeZoneProperty pTimeZoneProperty) { 
    TimeZone timeZoneRet = null;  

    if (pTimeZoneProperty != null && pTimeZoneProperty.getValue() != null && !pTimeZoneProperty.getValue().isEmpty()) { 
     timeZoneRet = TimeZone.getTimeZone(pTimeZoneProperty.getValue()); 
    } 

    return timeZoneRet; 
}