ansible/test/units/module_utils/facts
Sam Doran c4f442ed5a
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
2020-07-30 11:39:58 -04:00
..
fixtures Handle Slackware OS version strings containing a plus (“+”) (#68142) 2020-07-17 16:39:26 -04:00
hardware Clean up unit test boilerplate. 2020-06-22 14:20:33 -07:00
network Clean up unit test boilerplate. 2020-06-22 14:20:33 -07:00
other Clean up unit test boilerplate. 2020-06-22 14:20:33 -07:00
system distribution: Add support for DragonFly (#70748) 2020-07-21 13:47:11 -04:00
__init__.py
base.py Clean up unit test boilerplate. 2020-06-22 14:20:33 -07:00
test_ansible_collector.py Clean up unit test boilerplate. 2020-06-22 14:20:33 -07:00
test_collector.py Clean up unit test boilerplate. 2020-06-22 14:20:33 -07:00
test_collectors.py Clean up unit test boilerplate. 2020-06-22 14:20:33 -07:00
test_date_time.py facts - fix incorrect time for some date_time_facts (#70665) 2020-07-30 11:39:58 -04:00
test_facts.py setup: Handle CIFS share with backward slash (#70006) 2020-06-30 16:09:35 -04:00
test_timeout.py Clean up unit test boilerplate. 2020-06-22 14:20:33 -07:00
test_utils.py Clean up unit test boilerplate. 2020-06-22 14:20:33 -07:00