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:
commit
b0bfa93948
|
@ -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
|
||||
|
||||
|
|
Loading…
Reference in New Issue
Block a user