pyacs.lib.astrotime.datetime_round_second.datetime_round_second

pyacs.lib.astrotime.datetime_round_second.datetime_round_second(my_datetime)[source]

Round a Python datetime instance to the nearest second.

Parameters:

my_datetime (datetime) – Datetime instance to round.

Returns:

New rounded datetime (microsecond set to 0).

Return type:

datetime