mirror of https://github.com/ansible/ansible.git
You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
719c40bfdf
* [stable-2.10] facts - fix incorrect time for some date_time_facts (#70665)
The iso8601_micro and iso8601 facts incorrectly called now.utcnow(), resulting
in a new timestamp at the time it was called, not a conversion of the previously
stored timestamp.
Correct this by capturing the UTC timestamp once then calculating the local
time using the UTC offset of the current system.
* Use time.time() for getting the current time
* Convert from that stored epoch timestamp to local and UTC times
* Used existing timestamp for epoch time
* Add unit tests that validate the formate of the return value rather than an exact value since mocking time and timezone is non-trivial
(cherry picked from commit
|
4 years ago | |
---|---|---|
.. | ||
_vendor | 5 years ago | |
ansible_test | 5 years ago | |
cli | 5 years ago | |
compat | 6 years ago | |
config | 4 years ago | |
errors | 5 years ago | |
executor | 4 years ago | |
galaxy | 4 years ago | |
inventory | 4 years ago | |
inventory_test_data/group_vars | 10 years ago | |
mock | 4 years ago | |
module_utils | 4 years ago | |
modules | 4 years ago | |
parsing | 4 years ago | |
playbook | 4 years ago | |
plugins | 4 years ago | |
regex | 6 years ago | |
template | 5 years ago | |
utils | 4 years ago | |
vars | 5 years ago | |
__init__.py | 8 years ago | |
requirements.txt | 5 years ago | |
test_constants.py | 4 years ago | |
test_context.py | 4 years ago |