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

Skip to content

Conversation

@phutelmyer
Copy link
Contributor

Describe the change
Prior to this change, the format for date strings in the PDF scanner would display as a timestamp with timezone information (ex: 2022-08-03 08:00:30-05:00). This is accurate, but is not standard with most other scanner date times.

This change converts the date string to ISO 8601 (ex: 2022-08-03T13:00:30Z)

Describe testing procedures
Updated test_scan_pdf.py tests, confirmed a passing test.

...
#21 92.78 tests/test_scan_pcap.py ..
#21 93.81 tests/test_scan_pdf.py .
#21 93.87 tests/test_scan_pe.py .
...

Sample output

{
        "elapsed": 0.0142052,
        "flags": [],
        "images": 1,
        "lines": 34,
        "links": [],
        "words": 418,
        "author": "Ryan.OHoro",
        "creator": "Microsoft® Word 2016",
        "creation_date": "2022-12-16T19:48:52Z",
        "dirty": False,
        "embedded_files": {"count": 0, "names": []},
        "encrypted": False,
        "needs_pass": False,
        "format": "PDF 1.5",
        "keywords": "",
        "language": "en",
        "modify_date": "2022-12-16T19:48:52Z",
        "old_xrefs": True,
        "pages": 1,
        "producer": "Microsoft® Word 2016",
        "repaired": False,
        "subject": "",
        "title": "",
        "xrefs": 40,
        "phones": [],
        "objects": {},
    }

Checklist

  • My code follows the style guidelines of this project
  • I have performed a self-review of and tested my code
  • I have commented my code, particularly in hard-to-understand areas
  • I have made corresponding changes to the documentation
  • My changes generate no new warnings

@phutelmyer phutelmyer requested a review from ryanohoro February 2, 2023 15:26
@phutelmyer phutelmyer merged commit 154e73c into master Feb 3, 2023
@phutelmyer phutelmyer deleted the scanpdf-date-format branch February 3, 2023 16:09
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant