Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
这可能吗?我找到了一些转换为和从 localDateTime 转换的解决方案,如可以在这里看到
但我找不到 Joda Instant 的解决方案......
您可以使用 epoch millis 进行转换:
Timestamp ts = ....; Instant i = new Instant(ts.getTime()); Timestamp ts2 = new Timestamp(i.getMillis());