Code example for SimpleTimeZone

    static final String TYPE_BASE64 = "base64";
    static final String TYPE_ARRAY = "array";
    static final String TYPE_STRUCT = "struct";
    static SimpleDateFormat dateFormat = new SimpleDateFormat("yyyyMMdd'T'HH:mm:ss");
    static Calendar cal = Calendar.getInstance(new SimpleTimeZone(0, "GMT"));
    static void serialize(XmlSerializer serializer, Object object) throws IOException {
        if (object == null)
        // check for scalar types: 
        if (object instanceof Integer || object instanceof Short || object instanceof Byte) {
            serializer.startTag(null, TYPE_I4).text(object.toString()).endTag(null, TYPE_I4);
        } else 
        if (object instanceof Long) {
            serializer.startTag(null, TYPE_I8).text(object.toString()).endTag(null, TYPE_I8);
        } else 
        if (object instanceof Double || object instanceof Float) {
Connect your IDE to all the code out there  Get Codota for Java