MCPcopy Create free account
hub / github.com/pymupdf/PyMuPDF / get_pdf_now

Function get_pdf_now

src/__init__.py:23776–23791  ·  view source on GitHub ↗

"Now" timestamp in PDF Format

()

Source from the content-addressed store, hash-verified

23774
23775
23776def get_pdf_now() -> str:
23777 '''
23778 "Now" timestamp in PDF Format
23779 '''
23780 import time
23781 a = str(abs(time.altzone // 3600)).rjust(2, "0")
23782 b = str((abs(time.altzone // 60) % 60)).rjust(2, "0")
23783 tz = f"{a}'{b}'"
23784 tstamp = time.strftime("D:%Y%m%d%H%M%S", time.localtime())
23785 if time.altzone > 0:
23786 tstamp += "-" + tz
23787 elif time.altzone < 0:
23788 tstamp += "+" + tz
23789 else:
23790 pass
23791 return tstamp
23792
23793
23794class ElementPosition(object):

Callers 2

embfile_addMethod · 0.85
embfile_updMethod · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…