本文整理了Java中org.joda.time.LocalDateTime.plusSeconds()
方法的一些代码示例,展示了LocalDateTime.plusSeconds()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。LocalDateTime.plusSeconds()
方法的具体详情如下:
包路径:org.joda.time.LocalDateTime
类名称:LocalDateTime
方法名:plusSeconds
[英]Returns a copy of this datetime plus the specified number of seconds.
This LocalDateTime instance is immutable and unaffected by this method call.
The following three lines are identical in effect:
LocalDateTime added = dt.plusSeconds(6);
LocalDateTime added = dt.plus(Period.seconds(6));
LocalDateTime added = dt.withFieldAdded(DurationFieldType.seconds(), 6);
[中]返回此datetime加上指定秒数的副本。
此LocalDateTime实例是不可变的,不受此方法调用的影响。
以下三行实际上是相同的:
LocalDateTime added = dt.plusSeconds(6);
LocalDateTime added = dt.plus(Period.seconds(6));
LocalDateTime added = dt.withFieldAdded(DurationFieldType.seconds(), 6);
代码示例来源:origin: org.swisspush.gateleen/gateleen-queue
/**
* Returns the expiration time.
*
* @param timestamp timestamp
* @param expireAfter expireAfter
* @return expiration time.
*/
private static LocalDateTime getExpirationTime(LocalDateTime timestamp, int expireAfter) {
LocalDateTime expirationTime = timestamp.plusSeconds(expireAfter);
log.debug("getExpirationTime: " + expirationTime);
return expirationTime;
}
代码示例来源:origin: org.swisspush/gateleen-queue
/**
* Returns the expiration time.
*
* @param timestamp timestamp
* @param expireAfter expireAfter
* @return expiration time.
*/
private static LocalDateTime getExpirationTime(LocalDateTime timestamp, int expireAfter) {
LocalDateTime expirationTime = timestamp.plusSeconds(expireAfter);
log.debug("getExpirationTime: " + expirationTime);
return expirationTime;
}
代码示例来源:origin: com.synaptix/SynaptixWidget
break;
case 's':
dateTime = dateTime.plusSeconds(nb);
break;
case 'w':
代码示例来源:origin: effektif/effektif
Time.now = new LocalDateTime().plusSeconds(4);
代码示例来源:origin: com.helger/ph-webctrls
aTableScope.createItemRow ()
.setLabel (EText.MSG_SCOPE_EXPIRATION_DT.getDisplayText (aDisplayLocale))
.setCtrl (PDTToString.getAsString (aLastAccessDT.plusSeconds ((int) aWebScope.getMaxInactiveInterval ()),
aDisplayLocale));
aTableScope.createItemRow ()
代码示例来源:origin: com.phloc/phloc-webctrls
aTableScope.createItemRow ()
.setLabel (EText.MSG_SCOPE_EXPIRATION_DT.getDisplayText (aDisplayLocale))
.setCtrl (PDTToString.getAsString (aLastAccessDT.plusSeconds ((int) aWebScope.getMaxInactiveInterval ()),
aDisplayLocale));
aTableScope.createItemRow ()
内容来源于网络,如有侵权,请联系作者删除!