本文整理了Java中com.datastax.driver.core.LocalDate.getMillisSinceEpoch()
方法的一些代码示例,展示了LocalDate.getMillisSinceEpoch()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。LocalDate.getMillisSinceEpoch()
方法的具体详情如下:
包路径:com.datastax.driver.core.LocalDate
类名称:LocalDate
方法名:getMillisSinceEpoch
[英]Returns the number of milliseconds since January 1st, 1970 GMT.
[中]返回自1970年1月1日GMT以来的毫秒数。
代码示例来源:origin: com.datastax.cassandra/cassandra-driver-core
public LocalDateAssert hasMillisSinceEpoch(long expected) {
assertThat(actual.getMillisSinceEpoch()).isEqualTo(expected);
return this;
}
代码示例来源:origin: org.hibernate.ogm/hibernate-ogm-cassandra
@Override
public X extract(Tuple resultset, String name) {
final X result = (X) resultset.get( name );
if ( result == null ) {
return null;
}
else {
LocalDate localDate = (LocalDate) result;
Date date = new Date( localDate.getMillisSinceEpoch() );
return javaTypeDescriptor.wrap( date, null );
}
}
};
代码示例来源:origin: com.datastax.dse/dse-java-driver-core
public LocalDateAssert hasMillisSinceEpoch(long expected) {
assertThat(actual.getMillisSinceEpoch()).isEqualTo(expected);
return this;
}
代码示例来源:origin: com.datastax.dse/dse-java-driver-core
@Test(groups = "unit")
public void should_use_proleptic_parser() throws ParseException {
DateRange parsed = DateRange.parse("[0000 TO 0000-01-02]");
assertThat(parsed.getLowerBound().getTimestamp().getTime())
// Use LocalDate as reference since it is also proleptic
.isEqualTo(LocalDate.fromYearMonthDay(0, 1, 1).getMillisSinceEpoch());
}
代码示例来源:origin: org.apache.apex/malhar-contrib
break;
case TIMESTAMP:
final Date date = new Date(row.getDate(columnName).getMillisSinceEpoch());
((Setter<Object, Date>)setters.get(i)).set(obj, date);
break;
代码示例来源:origin: apache/apex-malhar
break;
case TIMESTAMP:
final Date date = new Date(row.getDate(columnName).getMillisSinceEpoch());
((Setter<Object, Date>)setters.get(i)).set(obj, date);
break;
内容来源于网络,如有侵权,请联系作者删除!