Skip to content

Commit

Permalink
repoquery: Do not translate time format strings (RhBz: 2245773)
Browse files Browse the repository at this point in the history
Given that the `--queryformat` option is commonly used to generate
machine-readable outputs from repoquery, we should ensure that the
output remains stable regardless of the locale used.

This partially reverts commit 1daf346.

= changelog =
msg:           Do not translate repoquery time format strings
type:          bugfix
resolves:      https://bugzilla.redhat.com/show_bug.cgi?id=2245773
  • Loading branch information
m-blaha authored and jan-kolarik committed Oct 27, 2023
1 parent 6a6b575 commit 3c8c66f
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions dnf/cli/commands/repoquery.py
Original file line number Diff line number Diff line change
Expand Up @@ -721,8 +721,7 @@ def __getattr__(self, attr):
def _get_timestamp(timestamp):
if timestamp > 0:
dt = datetime.datetime.utcfromtimestamp(timestamp)
# TRANSLATORS: This is the default time format for dnf repoquery.
return dt.strftime(_("%Y-%m-%d %H:%M"))
return dt.strftime("%Y-%m-%d %H:%M")
else:
return ''

Expand Down

0 comments on commit 3c8c66f

Please sign in to comment.