threetenbp 问答列表

如何修复org.threeten.bp.format.DateTimeParseException?

作者:Bala sundar k 提问时间:10/17/2018

我正在将UTC时间转换为本地时间,但遇到以下错误: org.threeten.bp.format.DateTimeParseException: text 'Wed Oct 17 06:12:19 ...

如何在android中使用回收视图显示本地日期类型?

作者:Lets Explorer 提问时间:10/17/2018

我正在使用 Threeten 时区将本地日期存储在 LocalDate 类型的列表中。 这是我的代码: private List<LocalDate> getWeekDays() { ZoneI...

android .app.Application 无法在片段中强制转换为 android .app.Activity

作者:Lets Explorer 提问时间:10/16/2018

我正在使用 Threeten 时区在 android 中获取日期和时间。但是在 AndroidThreeTen.init((Application) getContext()) 中出现错误;错误是“j...

org.threeten.bp.format.DateTimeParseException:无法在索引 19 处解析文本“2018-07-22T14:00:00-03:00”

作者:Alan Bastos 提问时间:9/28/2018

public static String formatter(String dateInPattern, String dateOutPattern) { OffsetDateTime dateI...

如何从没有时区偏移量的 UTC 毫秒值计算一天中的分钟数?

作者:JJD 提问时间:9/8/2018

给定以下时间戳... 2018-09-07T17:00:00+02:00 对应于 .. UTC: 1536332400000 milliseconds 我喜欢使用 ThreeTen 向后移...

如何正确使用ThreeTenABP根据UTC获取两个日期之间的时间(以毫秒为单位)

作者: 提问时间:8/14/2018

我正在使用我刚刚发现的这个库,据说它比 android 的 Joda 时间更重,我说到底是什么,让我们使用它。但是现在我正在努力在网上找到任何关于如何使用它的好例子,除了这两种方法之外,我还有: /...

如何在 Android Studio 中忽略 java.time 包

作者:Leo Aso 提问时间:7/7/2018

我目前正在开发一个 Android Studio 项目,最低 API 版本为 17 (JellyBean),所以我无法使用该包。相反,我使用的是适用于 Android 的 ThreeTen 向后移植 ...

如何在没有加载区域的情况下将 LocalDateTime 转换为 UTC 并返回?

作者:android developer 提问时间:4/11/2018

背景 我正在使用 android 的 threetenbp 向后移植(这里),以处理各种与时间相关的数据操作。 其中之一是将时间转换为不同的时区(当前时区到 UTC 并返回)。 我知道如果你使用...

使用 ThreeTen-Backport 将 ZonedDateTime 转换为 Calendar (JSR 310)

作者:Casey Harrils 提问时间:8/2/2017

我正在尝试使用 java.time 类 (JSR 310) 的向后移植将对象转换为对象:ThreeTen-Backport 项目。ZonedDateTimeCalendar 我的理解是,向后移植应该...

如何在蚂蚁工程中使用ThreeTen?

作者:hoss 提问时间:2/8/2018

我有一些遗留的 Java 6 项目,我想对它们进行一些更新,例如 Java 8 时间库。我发现使用 ThreeTen 向后移植是可能的。但是我不知道如何将它与 Ant 构建工具一起使用。请问有什么好的...


共90条 当前第9页