Python
Java
PHP
IOS
Android
Nodejs
JavaScript
Html5
Windows
Ubuntu
Linux
为什么 Duration 类没有“toSeconds()”方法?
我正在看Duration https docs oracle com javase 8 docs api java time Duration htmlJava 8 中的类并注意到它没有 long toSeconds 但其他的都有了toXX
Java
java8
apidesign
javatime
DateTimeFormatter 不解析自定义日期格式
我有一个关于java的问题DataTimeFormmater 我觉得我错过了一些东西 但又不知道到底错过了什么 String format yyyy MM dd T HH mm ss S T zxxx DateTimeFormatter f
Java
datetime
javatime
datetimeparsing
java.time 中是否有类与 Joda-Time Interval 相当?
我正在评估将我的项目从使用中迁移乔达时间 http www joda org joda time to the java time包 http docs oracle com javase 8 docs api java time pack
java8
jodatime
javatime
带有闰秒的持续时间
我需要在固定的日期时间在代码中安排任务 为此 我使用 ScheduledExecutorService 和方法schedule Runnable command long delay TimeUnit unit 如何根据闰秒计算此延迟 目前
Java
datetime
UTC
javatime
leapsecond
Java 中“DateTimeFormatter”格式化模式代码中的“uuuu”与“yyyy”?
The DateTimeFormatter https docs oracle com en java javase 11 docs api java base java time format DateTimeFormatter html
date
Parsing
datetime
dateformatting
javatime
Java 11 上出现 DateTimeParseException 但适用于 Java 10
以下测试用例在 Java 10 下完美运行 import java time Instant import java time format DateTimeFormatter import java time format DateTim
javatime
JAVA11
Java 8 DateTimeFormatter 解析可选部分
我需要将日期时间解析为两种不同格式的字符串 19861221235959Z 1986 12 21T23 59 59Z 以下 dateTimeFormatter 模式正确解析第一种日期字符串 DateTimeFormatter ofPatte
Java
java8
javatime
dateparsing
如何根据区域设置获取带有时区的数据时间模式?
以下代码是我已经拥有的代码 DateFormat f DateFormat getDateTimeInstance DateFormat SHORT DateFormat SHORT Java Locale SimpleDateFormat
Java
timezone
datetimeformat
javatime
如何从 LocalDate 和 LocalDateTime 中提取纪元?
如何提取纪元值Long来自实例LocalDateTime or LocalDate 我试过了 以下 但它给了我其他结果 LocalDateTime time LocalDateTime parse 04 02 2014 19 51 01 D
Java
time
java8
epoch
javatime
ZonedDateTime 美国/菲尼克斯时区到 GMT 有问题[重复]
这个问题在这里已经有答案了 我想将 美洲 菲尼克斯 转换为 GMT ZonedDateTime zdtPhoenix1 ZonedDateTime of 2022 6 27 10 0 0 0 ZoneId of America Phoeni
Java
java8
javatime
Java 8 java.time:在 Instant 与 LocalDateTime 中添加 TemporalUnit
我正在使用 Java 8 中的新 java time 包 我有一个遗留数据库 它为我提供了java util Date 我将其转换为Instant 我想做的是添加基于另一个数据库标志的一段时间 我可以添加天 周 月或年 我不想关心我要添加的
Java
java8
javatime
是否有相当于 ChronoUnit. Between 的函数返回分数而不是整数?
方法是这样的ChronoUnit HOURS between start end 回报long所以我无法从那里得到分数 是否有另一种方法 方法可以返回分数 整个要点ChronoUnit HOURS between start end 是获取
Java
java8
javatime
jsr310
Java 8 可选时间部分不起作用
我正在尝试为可选时间部分创建日期时间格式 目前我实现了这个 import java time import java time format DateTimeFormatter import java time format DateTim
Java
java8
datetimeformat
javatime
java.time.format.DateTimeParseException:无法在索引 21 处解析文本
我得到的日期时间值为 created at 2012 02 22T02 06 58 147Z Read only The time at which this task was created 这是由 Asana 给出的API https
Java
datetime
java8
javatime
如何使用 Java 8 中新的日期时间 API 获取当前小时?
在 Java 8 之前 常见的方法是Calendar API Calendar cal Calendar getInstance int hour cal get Calendar HOUR OF DAY 我如何获取当前小时 但使用新的日期
Java
java8
javatime
在 Java8 中设置 LocalDateTime 和时区的格式
我有这个简单的代码 DateTimeFormatter FORMATTER DateTimeFormatter ofPattern yyyyMMdd HH mm ss SSSSSS Z LocalDateTime now format FO
Java
java8
javatime
在 MySql TIME 列中保存 LocalTime
背景故事 我最近在保存时遇到了一个问题LocalTime to a TIMEMySQL 数据库中的列 节省价值9 00正在引起8 00保存在数据库中 这个问题没有出现在我的开发环境 Windows 上 但出现在我们尝试的两台 Linux 机
Java
mysql
javatime
localtime
在 JSR-310 中查找下一个出现的星期几
给定一个 JSR 310 对象 例如LocalDate 我如何找到下周三 或任何其他星期几 的日期 LocalDate today LocalDate now LocalDate nextWed 答案取决于您对 下周三 的定义 JSR 31
Java
datetime
java8
javatime
Java:解析 ISO_DATE / ISO_OFFSET_DATE
对于 REST Web 服务 我需要返回带时区的日期 无时间 显然不存在这样的东西ZonedDate在 Java 中 仅LocalDate and ZonedDateTime 所以我用的是ZonedDateTime作为后备 将这些日期转换为
Java
date
iso
javatime
timezoneoffset
Java 8 LocalDateTime 的周末过滤器
我想写一个布尔值函数 如果给定则返回 trueLocalDateTime落在两个特定时间点之间 否则为 false 具体来说我想要一个LocalDateTime过滤给定日期是否在 22 00 GMT Friday 和 23 00 GMT S
Java
filter
java8
javatime
«
1
2
3
4
5
6
7
»