Skip to content

Commit

Permalink
Prefix date.
Browse files Browse the repository at this point in the history
Fix #1843
  • Loading branch information
grewn0uille committed Mar 16, 2023
1 parent d490511 commit a3e69e4
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions tests/test_pdf.py
Original file line number Diff line number Diff line change
Expand Up @@ -562,8 +562,8 @@ def test_document_info():
b'006600740065007200a00061006c006c>') in pdf
assert b'/Keywords (html, css, pdf)' in pdf
assert b'/Subject <feff0042006c0061006820260020>' in pdf
assert b'/CreationDate (20110421230000Z)' in pdf
assert b"/ModDate (20130721234600+01'00)" in pdf
assert b'/CreationDate (D:20110421230000Z)' in pdf
assert b"/ModDate (D:20130721234600+01'00)" in pdf


@assert_no_logs
Expand Down
2 changes: 1 addition & 1 deletion weasyprint/pdf/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ def _w3c_date_to_pdf(string, attr_name):
pdf_date += f"{tz_hour:+03d}'{tz_minute:02d}"
else:
pdf_date += 'Z'
return pdf_date
return f'D:{pdf_date}'


def _reference_resources(pdf, resources, images, fonts):
Expand Down

0 comments on commit a3e69e4

Please sign in to comment.