| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
1 parent 313b3b4 commit f7cff58
3 files changed
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -37,5 +37,6 @@ Contributors are: | |||
| 37 | 37 | -Anil Khatri <anil.soccer.khatri _at_ gmail.com> | |
| 38 | 38 | -JJ Graham <thetwoj _at_ gmail.com> | |
| 39 | 39 | -Ben Thayer <ben _at_ benthayer.com> | |
| 40 | + -Dries Kennes <admin _at_ dries007.net> | ||
| 40 | 41 | ||
| 41 | 42 | Portions derived from other open source works and are clearly marked. | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -148,6 +148,8 @@ def parse_date(string_date): | |||
| 148 | 148 | try: | |
| 149 | 149 | if string_date.count(' ') == 1 and string_date.rfind(':') == -1: | |
| 150 | 150 | timestamp, offset = string_date.split() | |
| 151 | + if timestamp.startswith('@'): | ||
| 152 | + timestamp = timestamp[1:] | ||
| 151 | 153 | timestamp = int(timestamp) | |
| 152 | 154 | return timestamp, utctz_to_altz(verify_utctz(offset)) | |
| 153 | 155 | else: | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -220,6 +220,12 @@ def test_clone_from_keeps_env(self, rw_dir): | |||
| 220 | 220 | ||
| 221 | 221 | assert_equal(environment, cloned.git.environment()) | |
| 222 | 222 | ||
| 223 | + @with_rw_directory | ||
| 224 | + def test_date_format(self, rw_dir): | ||
| 225 | + repo = Repo.init(osp.join(rw_dir, "repo")) | ||
| 226 | + # @-timestamp is the format used by git commit hooks | ||
| 227 | + repo.index.commit("Commit messages", commit_date="@1400000000 +0000") | ||
| 228 | + | ||
| 223 | 229 | @with_rw_directory | |
| 224 | 230 | def test_clone_from_pathlib(self, rw_dir): | |
| 225 | 231 | if pathlib is None: # pythons bellow 3.4 don't have pathlib | |
| Back | FazBrowse Home | New Git URL |
0 commit comments