New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Invalid default format strings for contexts other than 'current' #808
Comments
The group brief_delta = "%(minute)d%(minute_label)s, %(second)d%(second_label)s"
short_delta = "%(hour)d%(hour_label)s, %(minute)d%(minute_label)s, %(second)d%(second_label)s"
long_delta = "%(day)d%(day_label)s, %(hour)d%(hour_label)s, %(minute)d%(minute_label)s"
delta_time = "%(day)d%(day_label)s, %(hour)d%(hour_label)s, %(minute)d%(minute_label)s" See Line 213 in 2639c6c
|
That ist an example:
The resulting syslog messages are:
So I guess, in that case the context is 'day'. |
Thanks for the example. This is going to take a rethink of how |
Fixing this required changing how delta times are handled. Your example now works. See commit 209fd34 Be sure to read the Upgrade Guide. This involved a modest breaking change. |
In
units.py
from line 748 on it says:time_format_dict
contains format strings like%X
or%x %X
and the like for the different contexts. Those format strings are not appropriate for thedelta_secs_to_string()
function, which requires format strings like%(hour)d %(hour_label)s, %(minute)d %(minute_label)s
.The text was updated successfully, but these errors were encountered: