Examples of withZoneRetainFields()


Examples of org.joda.time.DateTime.withZoneRetainFields()

        throw new ConversionException(e);
      }
      // apply the server time zone to the parsed value
      if (zone != null)
      {
        dateTime = dateTime.withZoneRetainFields(DateTimeZone.forTimeZone(zone));
      }

      return dateTime.toDate();
    }
    else
View Full Code Here

Examples of org.joda.time.DateTime.withZoneRetainFields()

        throw new ConversionException(e);
      }
      // apply the server time zone to the parsed value
      if (zone != null)
      {
        dateTime = dateTime.withZoneRetainFields(DateTimeZone.forTimeZone(zone));
      }     
     
      return dateTime.toDate();
    }
    else
View Full Code Here

Examples of org.joda.time.DateTime.withZoneRetainFields()

                double millis = RubyFloat.num2dbl(args[5]);
                int int_millis = (int) (millis * 1000) % 1000;
                dt = dt.plusMillis(int_millis);
            }

            dt = dt.withZoneRetainFields(dtz);

            // we might need to perform a DST correction
            if (isDst != null) {
                // the instant at which we will ask dtz what the difference between DST and
                // standard time is
View Full Code Here

Examples of org.joda.time.DateTime.withZoneRetainFields()

                double millis = RubyFloat.num2dbl(args[5]);
                int int_millis = (int) (millis * 1000) % 1000;
                dt = dt.plusMillis(int_millis);
            }

            dt = dt.withZoneRetainFields(dtz);

            // we might need to perform a DST correction
            if (isDst != null) {
                // the instant at which we will ask dtz what the difference between DST and
                // standard time is
View Full Code Here

Examples of org.joda.time.DateTime.withZoneRetainFields()

    }

    public void setAuthenticationTime(String authenticationTimeStr) {
        DateTimeFormatter dateTimeFormatter = DateTimeFormat.forPattern("yyy-MM-dd'T'HH:mm:ss'Z'");
        DateTime dateTime = dateTimeFormatter.parseDateTime(authenticationTimeStr);
        this.authenticationTime = dateTime.withZoneRetainFields(DateTimeZone.UTC).toDate();
    }

    void setPhishingResistant(boolean phishingResistant) {
        this.phishingResistant = phishingResistant;
    }
View Full Code Here

Examples of org.joda.time.DateTime.withZoneRetainFields()

        throw newConversionException(e, locale);
      }
      // apply the server time zone to the parsed value
      if (zone != null)
      {
        dateTime = dateTime.withZoneRetainFields(DateTimeZone.forTimeZone(zone));
      }

      return dateTime.toDate();
    }
    else
View Full Code Here

Examples of org.joda.time.DateTime.withZoneRetainFields()

                int int_millis = (int) (secs * 1000) % 1000;
                dt = dt.plusMillis(int_millis);
                nanos = ((long) (secs * 1000000000) % 1000000);
            }

            dt = dt.withZoneRetainFields(dtz);

            // If we're at a DST boundary, we need to choose the correct side of the boundary
            if (isDst) {
                final DateTime beforeDstBoundary = dt.withEarlierOffsetAtOverlap();
                final DateTime afterDstBoundary = dt.withLaterOffsetAtOverlap();
View Full Code Here

Examples of org.joda.time.DateTime.withZoneRetainFields()

        throw new ConversionException(e);
      }
      // apply the server time zone to the parsed value
      if (zone != null)
      {
        dateTime = dateTime.withZoneRetainFields(DateTimeZone.forTimeZone(zone));
      }

      return dateTime.toDate();
    }
    else
View Full Code Here

Examples of org.joda.time.DateTime.withZoneRetainFields()

        throw new ConversionException(e);
      }
      // apply the server time zone to the parsed value
      if (zone != null)
      {
        dateTime = dateTime.withZoneRetainFields(DateTimeZone.forTimeZone(zone));
      }

      return dateTime.toDate();
    }
    else
View Full Code Here

Examples of org.joda.time.DateTime.withZoneRetainFields()

    public static final DateTimeZone NYC_TIMEZONE = DateTimeZone.forID("America/New_York");

    public static long adjustTimestampEpoch(long dateUtc, DateTimeZone dateTimeZone) {
        DateTime dtDate = new DateTime(dateUtc * 1000L);
        DateTime dtEst = dtDate.withZone(dateTimeZone);
        return (dtEst.withZoneRetainFields(DateTimeZone.UTC).getMillis() / 1000);
    }
}
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.