We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
2 parents bcc2d62 + e181338 commit a190bc5Copy full SHA for a190bc5
ds1302.py
@@ -93,9 +93,9 @@ def write_datetime(self, dt):
93
byte_l[3] = (dt.tm_mday // 10) << 4 | dt.tm_mday % 10
94
byte_l[4] = (dt.tm_mon // 10) << 4 | dt.tm_mon % 10
95
byte_l[5] = 0
96
- byte_l[6] = ((dt.tm_year-2000 // 10) << 4) | (dt.tm_year-2000) % 10
+ byte_l[6] = (((dt.tm_year-2000) // 10) << 4) | (dt.tm_year-2000) % 10
97
self._start_tx()
98
self._w_byte(0xbe)
99
for byte in byte_l:
100
self._w_byte(byte)
101
- self._end_tx()
+ self._end_tx()
0 commit comments