allankp / pytest-testrail

pytest plugin for integration with TestRail, for creating testruns and updating results
MIT License
96 stars 124 forks source link

Override utcnow() to specific timezone #96

Closed brianbautista closed 5 years ago

brianbautista commented 5 years ago

Not necessarily a bug but Is there a way to override the datetime.utcnow() in the testrun_name to a specific timezone?

https://github.com/allankp/pytest-testrail/blob/92d0a279da0f12b912c3ad5c65561a3fb8c874a7/pytest_testrail/plugin.py#L89

apallier commented 5 years ago

Hi @brianbautista, what do you want to do ? Change the test run name ?

brianbautista commented 5 years ago

@apallier For example, the testruns are being named as Automated Run 24-07-2019 00:26:25 automatically. I would like to change the date format to YYYY-MM-DD and the time to be my current time zone, Pacific Time Zone USA UTC-8.

apallier commented 5 years ago

@brianbautista in this case, there is no way to do that. Feel free to submit a Pull Request allowing to configure it.