| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
1 parent a929ab2 commit 0900a51
2 files changed
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -27,7 +27,10 @@ | |||
| 27 | 27 | ||
| 28 | 28 | from time import ( | |
| 29 | 29 | time, | |
| 30 | - altzone | ||
| 30 | + daylight, | ||
| 31 | + altzone, | ||
| 32 | + timezone, | ||
| 33 | + localtime | ||
| 31 | 34 | ) | |
| 32 | 35 | import os | |
| 33 | 36 | from io import BytesIO | |
@@ -327,7 +330,8 @@ def create_from_tree(cls, repo, tree, message, parent_commits=None, head=False, | |||
| 327 | 330 | ||
| 328 | 331 | # PARSE THE DATES | |
| 329 | 332 | unix_time = int(time()) | |
| 330 | - offset = altzone | ||
| 333 | + is_dst = daylight and localtime().tm_isdst > 0 | ||
| 334 | + offset = altzone if is_dst else timezone | ||
| 331 | 335 | ||
| 332 | 336 | author_date_str = env.get(cls.env_author_date, '') | |
| 333 | 337 | if author_date: | |
| Back | FazBrowse Home | New Git URL |
0 commit comments