Package com.facebook.presto.jdbc.internal.joda.time

Examples of com.facebook.presto.jdbc.internal.joda.time.IllegalInstantException


            if (offset != iZone.getOffset(millis)) {
                String message = "Illegal instant due to time zone offset transition (" + iZone + ')';
                if (text != null) {
                    message = "Cannot parse \"" + text + "\": " + message;
                }
                throw new IllegalInstantException(message);
            }
        }
       
        return millis;
    }
View Full Code Here


        DateTimeZone zone = getZone();
        int offset = zone.getOffsetFromLocal(localInstant);
        long utcInstant = localInstant - offset;
        int offsetBasedOnUtc = zone.getOffset(utcInstant);
        if (offset != offsetBasedOnUtc) {
            throw new IllegalInstantException(localInstant, zone.getID());
        }
        return utcInstant;
    }
View Full Code Here

        public long set(long instant, int value) {
            long localInstant = iZone.convertUTCToLocal(instant);
            localInstant = iField.set(localInstant, value);
            long result = iZone.convertLocalToUTC(localInstant, false, instant);
            if (get(result) != value) {
                IllegalInstantException cause = new IllegalInstantException(localInstant,  iZone.getID());
                IllegalFieldValueException ex = new IllegalFieldValueException(iField.getType(), Integer.valueOf(value), cause.getMessage());
                ex.initCause(cause);
                throw ex;
            }
            return result;
        }
View Full Code Here

TOP

Related Classes of com.facebook.presto.jdbc.internal.joda.time.IllegalInstantException

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.