Skip to content

Commit

Permalink
Merge branch 'master' of https://github.com/demisto/demisto-py into u…
Browse files Browse the repository at this point in the history
…pdate_changelog
  • Loading branch information
darkushin committed May 10, 2022
2 parents b574cad + e7d7be6 commit 2a016c9
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
2 changes: 1 addition & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
[1]: https://pypi.org/project/demisto-py/#history

## 3.1.7
* Replaced the usage of the deprecated function pytz.localize().
* Replaced the usage of the deprecated function `pytz.localize()`.

## 3.1.6
* Added a proxy environment variable that uses BASE_URL_DEMISTO.
Expand Down
3 changes: 2 additions & 1 deletion demisto_client/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -202,7 +202,8 @@ def to_extended_dict(o):
))
elif isinstance(value, datetime.datetime):
if not value.tzinfo: # no tz defined -> use machine local
value = tzlocal.get_localzone().localize(value)
local_tz = tzlocal.get_localzone()
value = value.replace(tzinfo=local_tz)
result[o_map[attr]] = value.isoformat()
else:
result[o_map[attr]] = value
Expand Down

0 comments on commit 2a016c9

Please sign in to comment.