Groovy: How to get unix time of a certain date instead of current Date?

前端 未结 0 688
时光取名叫无心
时光取名叫无心 2021-01-19 21:13

I have this code:

Date toDate = new Date();
Date fromDate = toDate - 30
long unixToTime = currentDate.getTime() / 1000
long unixFromDate = fromDate.getTime()          


        
相关标签:
回答
  • 消灭零回复
提交回复
热议问题