Package rocks.xmpp.extensions.time.model

Examples of rocks.xmpp.extensions.time.model.TimeZoneAdapter


        Assert.assertEquals(xml, "<time xmlns=\"urn:xmpp:time\"><tzo>-02:00</tzo><utc>2014-01-07T03:34:03.001Z</utc></time>");
    }

    @Test
    public void testTimezoneAdapter() throws Exception {
        TimeZoneAdapter adapter = new TimeZoneAdapter();
        TimeZone timeZone = TimeZone.getTimeZone("GMT-08:00");
        String str = adapter.marshal(timeZone);
        Assert.assertEquals(str, "-08:00");

        TimeZone timeZoneUtc = adapter.unmarshal("Z");
        Assert.assertEquals(timeZoneUtc, TimeZone.getTimeZone("GMT"));
    }
View Full Code Here

TOP

Related Classes of rocks.xmpp.extensions.time.model.TimeZoneAdapter

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.