Skip to content

Commit d8c3e59

Browse files
authored
Merge pull request #1633 from caternuson/macropad_totp_update
Update Macropad TOTP
2 parents 18c62f2 + 55af7f1 commit d8c3e59

File tree

1 file changed

+1
-7
lines changed

1 file changed

+1
-7
lines changed

Macropad_2FA_TOTP/macropad_totp.py

Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -27,12 +27,6 @@
2727
DISPLAY_RATE = 1 # screen refresh rate
2828
#-------------------------------------------------------------------------
2929

30-
# TODO: remove this once this is resolved:
31-
# https://github.com/adafruit/circuitpython/issues/4893
32-
# and this gets merged:
33-
# https://github.com/adafruit/circuitpython/pull/4961
34-
EPOCH_OFFSET = 946684800 # delta from above issue thread
35-
3630
# Get sekrets from a secrets.py file
3731
try:
3832
from secrets import secrets
@@ -95,7 +89,7 @@
9589
# H E L P E R F U N C S
9690
#-------------------------------------------------------------------------
9791
def timebase(timetime):
98-
return (timetime + EPOCH_OFFSET - (UTC_OFFSET*3600)) // 30
92+
return (timetime - (UTC_OFFSET*3600)) // 30
9993

10094
def compute_codes(timestamp):
10195
codes = []

0 commit comments

Comments
 (0)