Question

Je convertitons une nouvelle date () à GMT.Maintenant, j'ai besoin d'ajouter une heure au temps GMT.La classe est Java.SQL.TMESTAMP.Comment ajouter 1 heure à la variable Nowgmt dans Grails.J'ai un plug-in Magic Number installé dans mon projet.

merci!

Était-ce utile?

La solution

Avez-vous essayé:

import groovy.time.TimeCategory

...

Timestamp plusOne = use( TimeCategory ) { nowGMT + 1.hour }.toTimestamp()

Licencié sous: CC-BY-SA avec attribution
Non affilié à StackOverflow
scroll top