1
0
mirror of https://github.com/JoelBender/bacpypes synced 2025-09-28 22:15:23 +08:00

Merge branch 'master' into 536-cov-stop-after-a-while

This commit is contained in:
Joel Bender 2025-01-21 23:08:20 -05:00 committed by GitHub
commit b0bfa93948
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -7,6 +7,7 @@ Primitive Data
import sys
import struct
import time
import datetime
import re
from .debugging import ModuleLogger, btox
@ -1446,8 +1447,9 @@ class Date(Atomic):
pass
else:
try:
today = time.mktime( (year + 1900, month, day, 0, 0, 0, 0, 0, -1) )
day_of_week = time.gmtime(today)[6] + 1
day_of_week = (
datetime.datetime(year + 1900, month, day).weekday() + 1
)
except OverflowError:
pass