Skip to content

Commit

Permalink
Update epoch string generation comment
Browse files Browse the repository at this point in the history
* Update epoch string generation comment
  • Loading branch information
Mark Bonsack committed Feb 21, 2020
1 parent b225374 commit 0204683
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion tests/test_cisco_acs.py
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ def time_operations(dt):
# epoch = dt.fromtimestamp(dt.timestamp()).strftime('%s')

# Since datetime.now().astimezone() is aware, strftime() should be safe and form below OK
# Trim last 3 digits of microsecond resolution to obtain milliseconds
# Trim last 3 or 7 characters of microsecond resolution to obtain milliseconds or whole seconds, respectively
epoch = dt.astimezone().strftime("%s.%f")[:-3]

return iso, bsd, time, date, tzoffset, epoch
Expand Down
2 changes: 1 addition & 1 deletion tests/test_fortinet_ngfw.py
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ def time_operations(dt):
# epoch = dt.fromtimestamp(dt.timestamp()).strftime('%s')

# Since datetime.now().astimezone() is aware, strftime() should be safe and form below OK
# Trim last 3 digits of microsecond resolution to obtain milliseconds
# Trim last 3 or 7 characters of microsecond resolution to obtain milliseconds or whole seconds, respectively
epoch = dt.astimezone().strftime("%s.%f")[:-7]

return iso, bsd, time, date, tzoffset, epoch
Expand Down
2 changes: 1 addition & 1 deletion tests/test_fortinet_web.py
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ def time_operations(dt):
# epoch = dt.fromtimestamp(dt.timestamp()).strftime('%s')

# Since datetime.now().astimezone() is aware, strftime() should be safe and form below OK
# Trim last 3 digits of microsecond resolution to obtain milliseconds
# Trim last 3 or 7 characters of microsecond resolution to obtain milliseconds or whole seconds, respectively
epoch = dt.astimezone().strftime("%s.%f")[:-7]

return iso, bsd, time, date, tzoffset, epoch
Expand Down

0 comments on commit 0204683

Please sign in to comment.