So I have a datetime.datetime
object and I want to compute the next minute of it. What I mean by next minute is the same time but at the very beginning of the next minute. For example, the next minute of 16:38:23.997 is 16:39:00.000.
I can do that easily by adding 1 to the minute and setting every smaller values to 0 (seconds, milliseconds, etc), but I'm not satisfied with this way, because I may need to carry out by checking if the minute becomes higher than 60, and if the hour is bigger than 24... and it ends up being over complicated for what I want to do
Is there a "simple" pythonic way to achieve this ?