diff options
| author | 2019-09-26 20:45:19 +0200 | |
|---|---|---|
| committer | 2019-09-26 20:45:19 +0200 | |
| commit | 8164717102b1fc25d9b5b9107a0b6fa163b90d94 (patch) | |
| tree | 1ddf6de366ce32a944579102a837fdca645d0f8c /tests | |
| parent | Add utility function to consistently format infraction timestamps (diff) | |
Use format_infaction datetime util in talentpool
The watchchannel ABC defined its own private utility function to
format ISO datetime strings to something more human-readable. I have
removed this private utility function and replaced the calls to it
with calls to the new `format_infraction` utility function defined in
bot.utils.time.
In addition, I've changed the utility function to use `dateutil` to
parse the datetime string, since `dateutil.parser.isoparse` supports
the strings our API generates out of the box. With the built-in
`datetime.datetime.fromisoformat`, we needed to prepare the string by
slicing of the `Z` timezone indicator.
Diffstat (limited to 'tests')
0 files changed, 0 insertions, 0 deletions