我将新的Date()转换为GMT。现在我需要在格林威治标准时间上增加 1 小时。该类是java.sql.timeStamp。如何在圣杯中向 nowGMT 变量添加 1 小时。我的项目中安装了幻数插件。
谢谢!
你试过吗:
import groovy.time.TimeCategory
...
Timestamp plusOne = use( TimeCategory ) { nowGMT + 1.hour }.toTimestamp()