FuelRats / pipsqueak

ED Fuel rats IRC bot
Other
13 stars 14 forks source link

Cleanup UTC time calls #255

Closed theunkn0wn1 closed 6 years ago

theunkn0wn1 commented 6 years ago

Adds a convenience function to time_utils named utc_now_tz() this returns the correctly ISO formatted string with the correct timezone.

def utc_now_tz()->str:
    """

    :return: current UTC time in a timezone-aware string.
    """
    return datetime.datetime.now(datetime.timezone.utc).isoformat().replace('+00:00', 'Z')

Also replaced the hardcoded instances with calls to the above function.

This depends on #254

Marenthyu commented 6 years ago

Why is this dependant on #254 ? i do not see the connection

theunkn0wn1 commented 6 years ago

Its dependent because i forked cleanup/time off the branch from #254 , though the changes themselves on this PR can be rebased purely on develop methinks. IM just certain how github handles name changes with multiple pending PRs.