Examples of toLocalDateTime()


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

            case VALUE_STRING:
                DateTime local = parseLocal(jp);
                if (local == null) {
                    return null;
                }
                return local.toLocalDateTime();
            }
            throw ctxt.wrongTokenException(jp, JsonToken.START_ARRAY, "expected JSON Array or Number");
        }
    }
View Full Code Here

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

        case VALUE_STRING:
            DateTime local = parseLocal(jp);
            if (local == null) {
                return null;
            }
            return local.toLocalDateTime();
        }
        throw ctxt.wrongTokenException(jp, JsonToken.START_ARRAY, "expected JSON Array or Number");
    }
}
View Full Code Here

Examples of org.threeten.bp.OffsetDateTime.toLocalDateTime()

   * @return the SQL time-stamp, not null
   */
  public static Timestamp toSqlTimestamp(Instant instant) {
    ArgumentChecker.notNull(instant, "instant");
    OffsetDateTime utc = OffsetDateTime.ofInstant(instant, ZoneOffset.UTC);
    return toSqlDateTime(utc.toLocalDateTime());
  }

  /**
   * Creates an {@code Instant} from an SQL time-stamp.
   *
 
View Full Code Here

Examples of org.threeten.bp.ZonedDateTime.toLocalDateTime()

        ZoneRules test = europeLondon();
        ZonedDateTime old = createZDT(1800, 1, 1, ZoneOffset.UTC);
        Instant instant = old.toInstant();
        ZoneOffset offset = ZoneOffset.ofHoursMinutesSeconds(0, -1, -15);
        assertEquals(test.getOffset(instant), offset);
        checkOffset(test, old.toLocalDateTime(), offset, 1);
        assertEquals(test.getStandardOffset(instant), offset);
        assertEquals(test.getDaylightSavings(instant), Duration.ZERO);
        assertEquals(test.isDaylightSavings(instant), false);
    }
View Full Code Here

Examples of org.threeten.bp.ZonedDateTime.toLocalDateTime()

        ZoneRules test = europeParis();
        ZonedDateTime old = createZDT(1800, 1, 1, ZoneOffset.UTC);
        Instant instant = old.toInstant();
        ZoneOffset offset = ZoneOffset.ofHoursMinutesSeconds(0, 9, 21);
        assertEquals(test.getOffset(instant), offset);
        checkOffset(test, old.toLocalDateTime(), offset, 1);
        assertEquals(test.getStandardOffset(instant), offset);
        assertEquals(test.getDaylightSavings(instant), Duration.ZERO);
        assertEquals(test.isDaylightSavings(instant), false);
    }
View Full Code Here

Examples of org.threeten.bp.ZonedDateTime.toLocalDateTime()

        ZoneRules test = americaNewYork();
        ZonedDateTime old = createZDT(1800, 1, 1, ZoneOffset.UTC);
        Instant instant = old.toInstant();
        ZoneOffset offset = ZoneOffset.of("-04:56:02");
        assertEquals(test.getOffset(instant), offset);
        checkOffset(test, old.toLocalDateTime(), offset, 1);
        assertEquals(test.getStandardOffset(instant), offset);
        assertEquals(test.getDaylightSavings(instant), Duration.ZERO);
        assertEquals(test.isDaylightSavings(instant), false);
    }
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.