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.
我将 new Date() 转换为 GMT。现在我需要在 GMT 时间上增加 1 小时。该类是 java.sql.timeStamp。如何将 1 小时添加到 grails 中的 nowGMT 变量。我的项目中安装了幻数插件。
谢谢!
你有没有尝试过:
import groovy.time.TimeCategory ... Timestamp plusOne = use( TimeCategory ) { nowGMT + 1.hour }.toTimestamp()