Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Displaying timezone information in HTML report #960

Merged
merged 3 commits into from
Jul 23, 2020
Merged

Conversation

xyb
Copy link
Contributor

@xyb xyb commented Mar 19, 2020

No description provided.

@xyb xyb changed the title Displaying timezone information in HTML report WIP: Displaying timezone information in HTML report Mar 19, 2020
@xyb xyb changed the title WIP: Displaying timezone information in HTML report Displaying timezone information in HTML report Mar 19, 2020
@nedbat
Copy link
Owner

nedbat commented Jun 28, 2020

Thanks for doing this, and sorry for my silence.

I'm curious why the timezone is important on the report?

I have some concerns about the code. On my Mac, on 2.7, the timezone is shown as "+2000", but on 3.7, it's "-0400". I'm not that comfortable with maintaining the fallback code for format_local_datetime. How would you feel about displaying the timezone only for Python versions that can do it natively (3.6+)?

@codecov-commenter
Copy link

codecov-commenter commented Jul 19, 2020

Codecov Report

Merging #960 into master will increase coverage by 0.00%.
The diff coverage is 100.00%.

Impacted file tree graph

@@           Coverage Diff           @@
##           master     #960   +/-   ##
=======================================
  Coverage   94.03%   94.04%           
=======================================
  Files          86       86           
  Lines       12102    12182   +80     
  Branches     1211     1224   +13     
=======================================
+ Hits        11380    11456   +76     
- Misses        588      590    +2     
- Partials      134      136    +2     
Impacted Files Coverage Δ
coverage/backward.py 95.74% <100.00%> (+0.18%) ⬆️
coverage/html.py 100.00% <100.00%> (ø)
tests/test_html.py 99.24% <100.00%> (-0.38%) ⬇️
coverage/summary.py 88.07% <0.00%> (-4.09%) ⬇️
tests/test_xml.py 100.00% <0.00%> (ø)
tests/test_arcs.py 100.00% <0.00%> (ø)
tests/test_json.py 100.00% <0.00%> (ø)
tests/test_config.py 100.00% <0.00%> (ø)
coverage/xmlreport.py 100.00% <0.00%> (ø)
... and 9 more

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update f318f93...d66983d. Read the comment docs.

@xyb
Copy link
Contributor Author

xyb commented Jul 19, 2020

I'm curious why the timezone is important on the report?

I have multiple CI servers that have different time zones, so I would like to know the exact time of the test report.

How would you feel about displaying the timezone only for Python versions that can do it natively (3.6+)?

Sounds good. The backward compatible code is ugly, let's get rid of it :)

@nedbat nedbat merged commit 2ab211a into nedbat:master Jul 23, 2020
nedbat pushed a commit that referenced this pull request Jul 23, 2020
* Displaying timezone information in HTML report

* A helpber to format datetime with local timezone

* No backward compatibility with older python versions
nedbat pushed a commit that referenced this pull request Jul 23, 2020
* Displaying timezone information in HTML report

* A helpber to format datetime with local timezone

* No backward compatibility with older python versions
@nedbat
Copy link
Owner

nedbat commented Jul 23, 2020

Thanks! I merged it, and had to fix the test (sometimes time zones are -XXXX instead of +XXXX).

@nedbat
Copy link
Owner

nedbat commented Jul 24, 2020

This is available in coverage 5.2.1.

# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants