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.
我正在从要为其创建新 DateTime 的文件中提取时间戳,但我想在整点时间创建 DateTime(或者任何 Joda Period 都可以)。 我怎样才能做到这一点?
哇哦,找到了。一旦我追踪电话,就像 Joda 中的一切一样简单。
DateTime dt = new DateTime().hourOfDay().roundFloorCopy();