Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit da55bb6

Browse files
author
Alexis Bienvenüe
committed
Revert to 2000-01-01 for the SOURCE_DATE_EPOCH test date.
This reverts commit c007f49.
1 parent d10a21e commit da55bb6

3 files changed

Lines changed: 8 additions & 8 deletions

File tree

lib/matplotlib/testing/determinism.py

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ def _test_determinism_save(filename, objects='mhi', format="pdf"):
1414
# to a constant value, so that time difference is not
1515
# taken into account
1616
sde = os.environ.pop('SOURCE_DATE_EPOCH', None)
17-
os.environ['SOURCE_DATE_EPOCH'] = "976875010"
17+
os.environ['SOURCE_DATE_EPOCH'] = "946684800"
1818

1919
fig = plt.figure()
2020

@@ -100,16 +100,16 @@ def _test_determinism(objects='mhi', format="pdf", uid=""):
100100
def _test_source_date_epoch(format, string, keyword=b"CreationDate"):
101101
"""
102102
Test SOURCE_DATE_EPOCH support. Output a document with the envionment
103-
variable SOURCE_DATE_EPOCH set to 2000-12-15 10:10:10 UTC and check that
104-
the document contains the timestamp that corresponds to this date (given as
105-
an argument).
103+
variable SOURCE_DATE_EPOCH set to 2000-01-01 00:00 UTC and check that the
104+
document contains the timestamp that corresponds to this date (given as an
105+
argument).
106106
107107
Parameters
108108
----------
109109
format : str
110110
format string, such as "pdf".
111111
string : str
112-
timestamp string for 2000-12-15 10:10:10 UTC.
112+
timestamp string for 2000-01-01 00:00 UTC.
113113
keyword : str
114114
a string to look at when searching for the timestamp in the document
115115
(used in case the test fails).

lib/matplotlib/tests/test_backend_pdf.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -114,7 +114,7 @@ def test_composite_image():
114114
@cleanup
115115
def test_source_date_epoch():
116116
"""Test SOURCE_DATE_EPOCH support for PDF output"""
117-
_test_source_date_epoch("pdf", b"/CreationDate (D:20001215101010Z)")
117+
_test_source_date_epoch("pdf", b"/CreationDate (D:20000101000000Z)")
118118

119119

120120
@cleanup

lib/matplotlib/tests/test_backend_ps.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -181,9 +181,9 @@ def test_source_date_epoch():
181181
"""Test SOURCE_DATE_EPOCH support for PS output"""
182182
# SOURCE_DATE_EPOCH support is not tested with text.usetex,
183183
# because the produced timestamp comes from ghostscript:
184-
# %%CreationDate: D:20001215101010Z00\'00\', and this could change
184+
# %%CreationDate: D:20000101000000Z00\'00\', and this could change
185185
# with another ghostscript version.
186-
_test_source_date_epoch("ps", b"%%CreationDate: Fri Dec 15 10:10:10 2000")
186+
_test_source_date_epoch("ps", b"%%CreationDate: Sat Jan 1 00:00:00 2000")
187187

188188

189189
@cleanup

0 commit comments

Comments
 (0)