问题
I want to modify LocalDateTime.now()
by adding a certain amount of minutes to it. How do I do that?
回答1:
If you are using java 8 then you can still use the same syntax
LocalDateTime fiveMinutesLater = LocalDateTime.now().plusMinutes(5)
来源:https://stackoverflow.com/questions/30374796/how-can-i-add-an-int-minutes-to-localdatetime-now