helper.date_and_time

Date and time


source

current_time_formatted_to_minutes

 current_time_formatted_to_minutes ()

*Return the current time to minutes.

Returns

  • str
    • In UTC time, to minutes.*

The current_time_formatted_to_minutes function is a convenience function that returns a string formatting current UTC time:

time_str = current_time_formatted_to_minutes()
print(time_str)
2024-08-30T19:29

Use the dattime.dattime.fromisoformat function to convert back the formatted string to a datetime.datetime object:

dt = datetime.datetime.fromisoformat(time_str)