We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent fee6097 commit c63e45eCopy full SHA for c63e45e
1 file changed
pyfoxfile/pyfile.py
@@ -1073,6 +1073,14 @@ def format_ns_utc(ts_ns, fmt='%Y-%m-%d %H:%M:%S'):
1073
ns_str = "%09d" % ns
1074
return base + "." + ns_str
1075
1076
+def format_ns_local(ts_ns, fmt='%Y-%m-%d %H:%M:%S'):
1077
+ ts_ns = int(ts_ns)
1078
+ sec, ns = divmod(ts_ns, 10**9)
1079
+ dt = datetime.datetime.fromtimestamp(sec).replace(microsecond=ns // 1000)
1080
+ base = dt.strftime(fmt)
1081
+ ns_str = "%09d" % ns
1082
+ return base + "." + ns_str
1083
+
1084
def CheckSumSupport(checkfor, guaranteed=True):
1085
if(guaranteed):
1086
try:
0 commit comments