Examples of convertLocalToUTC()


Examples of org.joda.time.DateTimeZone.convertLocalToUTC()

    public String format(DateTime dateTime, Locale locale) {
        if (dateTime == null) {
            return "";
        }
        DateTimeZone timeZone = dateTime.getZone();
        long utcTime = timeZone.convertLocalToUTC(dateTime.getMillis(), false);
        dateTime = new DateTime(utcTime + offset);
        return formatter.withLocale(locale).print(dateTime);
    }

    /**
 
View Full Code Here

Examples of org.joda.time.DateTimeZone.convertLocalToUTC()

    @Override
    public void setValue(Object value) throws JspTagException {
        if (value != null) {
            DateTime time = (DateTime) value;
            DateTimeZone zone = time.getZone();
            long utcTime = zone.convertLocalToUTC(time.getMillis(), false);
            time = new DateTime(utcTime + offset);
            super.setValue(time);
        } else {
            super.setValue(null);
        }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.