org.joda.time.LocalTime.fromMillisOfDay()方法的使用及代码示例

x33g5p2x  于2022-01-23 转载在 其他  
字(6.4k)|赞(0)|评价(0)|浏览(202)

本文整理了Java中org.joda.time.LocalTime.fromMillisOfDay()方法的一些代码示例,展示了LocalTime.fromMillisOfDay()的具体用法。这些代码示例主要来源于Github/Stackoverflow/Maven等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。LocalTime.fromMillisOfDay()方法的具体详情如下:
包路径:org.joda.time.LocalTime
类名称:LocalTime
方法名:fromMillisOfDay

LocalTime.fromMillisOfDay介绍

[英]Constructs a LocalTime from the specified millis of day using the ISO chronology.

The millisOfDay value may exceed the number of millis in one day, but additional days will be ignored. This method uses the UTC time zone internally.
[中]使用ISO年表从指定的毫秒天数构造LocalTime。
millisOfDay值可能超过一天中的毫秒数,但会忽略其他天数。此方法在内部使用UTC时区。

代码示例

代码示例来源:origin: joda-time/joda-time

  1. /**
  2. * Constructs a LocalTime from the specified millis of day using the
  3. * ISO chronology.
  4. * <p>
  5. * The millisOfDay value may exceed the number of millis in one day,
  6. * but additional days will be ignored.
  7. * This method uses the UTC time zone internally.
  8. *
  9. * @param millisOfDay the number of milliseconds into a day to convert
  10. */
  11. public static LocalTime fromMillisOfDay(long millisOfDay) {
  12. return fromMillisOfDay(millisOfDay, null);
  13. }

代码示例来源:origin: JodaOrg/joda-time

  1. /**
  2. * Constructs a LocalTime from the specified millis of day using the
  3. * ISO chronology.
  4. * <p>
  5. * The millisOfDay value may exceed the number of millis in one day,
  6. * but additional days will be ignored.
  7. * This method uses the UTC time zone internally.
  8. *
  9. * @param millisOfDay the number of milliseconds into a day to convert
  10. */
  11. public static LocalTime fromMillisOfDay(long millisOfDay) {
  12. return fromMillisOfDay(millisOfDay, null);
  13. }

代码示例来源:origin: org.apache.avro/avro

  1. @Override
  2. public LocalTime fromLong(Long microsFromMidnight, Schema schema, LogicalType type) {
  3. return LocalTime.fromMillisOfDay(microsFromMidnight / 1000);
  4. }
  5. }

代码示例来源:origin: org.apache.avro/avro

  1. @Override
  2. public LocalTime fromInt(Integer millisFromMidnight, Schema schema, LogicalType type) {
  3. return LocalTime.fromMillisOfDay(millisFromMidnight);
  4. }

代码示例来源:origin: apache/avro

  1. @Override
  2. public LocalTime fromInt(Integer millisFromMidnight, Schema schema, LogicalType type) {
  3. return LocalTime.fromMillisOfDay(millisFromMidnight);
  4. }

代码示例来源:origin: apache/avro

  1. @Override
  2. public LocalTime fromLong(Long microsFromMidnight, Schema schema, LogicalType type) {
  3. return LocalTime.fromMillisOfDay(microsFromMidnight / 1000);
  4. }

代码示例来源:origin: camunda/camunda-bpm-platform

  1. /**
  2. * Constructs a LocalTime from the specified millis of day using the
  3. * ISO chronology.
  4. * <p>
  5. * The millisOfDay value may exceed the number of millis in one day,
  6. * but additional days will be ignored.
  7. * This method uses the UTC time zone internally.
  8. *
  9. * @param millisOfDay the number of milliseconds into a day to convert
  10. */
  11. public static LocalTime fromMillisOfDay(long millisOfDay) {
  12. return fromMillisOfDay(millisOfDay, null);
  13. }

代码示例来源:origin: apache/drill

  1. LocalTime lT = LocalTime.fromMillisOfDay(t);
  2. this.value = KeyValueBuilder.initFrom(new OTime(lT.getHourOfDay(), lT.getMinuteOfHour(), lT.getSecondOfMinute(), lT.getMillisOfSecond()));
  3. this.path = path;

代码示例来源:origin: org.springframework.data/spring-data-cassandra

  1. @Override
  2. public LocalTime convert(Long source) {
  3. return LocalTime.fromMillisOfDay(source);
  4. }
  5. }

代码示例来源:origin: org.kill-bill.billing/killbill-osgi-bundles-jruby

  1. /**
  2. * Constructs a LocalTime from the specified millis of day using the
  3. * ISO chronology.
  4. * <p>
  5. * The millisOfDay value may exceed the number of millis in one day,
  6. * but additional days will be ignored.
  7. * This method uses the UTC time zone internally.
  8. *
  9. * @param millisOfDay the number of milliseconds into a day to convert
  10. */
  11. public static LocalTime fromMillisOfDay(long millisOfDay) {
  12. return fromMillisOfDay(millisOfDay, null);
  13. }

代码示例来源:origin: org.apache.servicemix.bundles/org.apache.servicemix.bundles.avro

  1. @Override
  2. public LocalTime fromLong(Long microsFromMidnight, Schema schema, LogicalType type) {
  3. return LocalTime.fromMillisOfDay(microsFromMidnight / 1000);
  4. }
  5. }

代码示例来源:origin: com.ning.billing/killbill-osgi-bundles-jruby

  1. /**
  2. * Constructs a LocalTime from the specified millis of day using the
  3. * ISO chronology.
  4. * <p>
  5. * The millisOfDay value may exceed the number of millis in one day,
  6. * but additional days will be ignored.
  7. * This method uses the UTC time zone internally.
  8. *
  9. * @param millisOfDay the number of milliseconds into a day to convert
  10. */
  11. public static LocalTime fromMillisOfDay(long millisOfDay) {
  12. return fromMillisOfDay(millisOfDay, null);
  13. }

代码示例来源:origin: org.jadira.usertype/usertype.core

  1. @Override
  2. public LocalTime fromNonNullValue(Integer value) {
  3. return LocalTime.fromMillisOfDay(value);
  4. }

代码示例来源:origin: org.apache.servicemix.bundles/org.apache.servicemix.bundles.joda-time

  1. /**
  2. * Constructs a LocalTime from the specified millis of day using the
  3. * ISO chronology.
  4. * <p>
  5. * The millisOfDay value may exceed the number of millis in one day,
  6. * but additional days will be ignored.
  7. * This method uses the UTC time zone internally.
  8. *
  9. * @param millisOfDay the number of milliseconds into a day to convert
  10. */
  11. public static LocalTime fromMillisOfDay(long millisOfDay) {
  12. return fromMillisOfDay(millisOfDay, null);
  13. }

代码示例来源:origin: org.jadira.usertype/usertype.jodatime

  1. @Override
  2. public LocalTime fromNonNullValue(Long value) {
  3. return LocalTime.fromMillisOfDay(value / 1000000L);
  4. }

代码示例来源:origin: io.virtdata/virtdata-lib-realer

  1. /**
  2. * Constructs a LocalTime from the specified millis of day using the
  3. * ISO chronology.
  4. * <p>
  5. * The millisOfDay value may exceed the number of millis in one day,
  6. * but additional days will be ignored.
  7. * This method uses the UTC time zone internally.
  8. *
  9. * @param millisOfDay the number of milliseconds into a day to convert
  10. */
  11. public static LocalTime fromMillisOfDay(long millisOfDay) {
  12. return fromMillisOfDay(millisOfDay, null);
  13. }

代码示例来源:origin: joda-time/joda-time-hibernate

  1. public Object nullSafeGet(ResultSet resultSet, String string) throws SQLException {
  2. Object timestamp = StandardBasicTypes.INTEGER.nullSafeGet(resultSet, string);
  3. if (timestamp == null) {
  4. return null;
  5. }
  6. return LocalTime.fromMillisOfDay(((Number) timestamp).intValue());
  7. }

代码示例来源:origin: com.datastax.cassandra/cassandra-driver-extras

  1. @Override
  2. public LocalTime deserialize(ByteBuffer bytes, ProtocolVersion protocolVersion)
  3. throws InvalidTypeException {
  4. if (bytes == null || bytes.remaining() == 0) return null;
  5. long nanosOfDay = bigint().deserializeNoBoxing(bytes, protocolVersion);
  6. return LocalTime.fromMillisOfDay(NANOSECONDS.toMillis(nanosOfDay));
  7. }

代码示例来源:origin: zhicwu/cassandra-jdbc-driver

  1. @Override
  2. public Time deserialize(ByteBuffer bytes, ProtocolVersion protocolVersion) throws InvalidTypeException {
  3. if (bytes == null || bytes.remaining() == 0)
  4. return null;
  5. long nanosOfDay = bigint().deserializeNoBoxing(bytes, protocolVersion);
  6. return new Time(LocalTime.fromMillisOfDay(nanosOfDay / 1000000L).toDateTimeToday().getMillis());
  7. }

代码示例来源:origin: zhicwu/cassandra-jdbc-driver

  1. @Override
  2. public String deserialize(ByteBuffer bytes, ProtocolVersion protocolVersion) throws InvalidTypeException {
  3. if (bytes == null || bytes.remaining() == 0)
  4. return null;
  5. long nanosOfDay = bigint().deserializeNoBoxing(bytes, protocolVersion);
  6. return LocalTime.fromMillisOfDay(nanosOfDay / 1000000).toString();
  7. }

相关文章