mirror of
https://github.com/saltstack/salt.git
synced 2025-04-17 10:10:20 +00:00
Merge pull request #38957 from mcalmer/fix-rpm-install_date-timezone
Fix timezone handling for rpm installtime
This commit is contained in:
commit
27166fad4e
1 changed files with 1 additions and 1 deletions
|
@ -575,7 +575,7 @@ def info(*packages, **attr):
|
|||
# Convert Unix ticks into ISO time format
|
||||
if key in ['build_date', 'install_date']:
|
||||
try:
|
||||
pkg_data[key] = datetime.datetime.fromtimestamp(int(value)).isoformat() + "Z"
|
||||
pkg_data[key] = datetime.datetime.utcfromtimestamp(int(value)).isoformat() + "Z"
|
||||
except ValueError:
|
||||
log.warning('Could not convert "{0}" into Unix time'.format(value))
|
||||
continue
|
||||
|
|
Loading…
Add table
Reference in a new issue