Skip to content

Commit

Permalink
FIX unparse_absolute_time
Browse files Browse the repository at this point in the history
  • Loading branch information
hartois committed May 6, 2024
1 parent 2a89dea commit 4a4d3e9
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion smpp/pdu/smpp_time.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@

from datetime import datetime, tzinfo, timedelta
from collections import namedtuple
import math

class FixedOffset(tzinfo):
"""Fixed offset in minutes east from UTC."""
Expand Down Expand Up @@ -118,7 +119,7 @@ def unparse_absolute_time(dt):
if not isinstance(dt, datetime):
raise ValueError("input must be a datetime but got %s" % type(dt))
YYMMDDhhmmss = unparse_YYMMDDhhmmss(dt)
tenthsOfSeconds = dt.microsecond/(100*1000)
tenthsOfSeconds = math.floor(dt.microsecond/(100*1000))
quarterHrOffset = 0
p = b'+'
if dt.tzinfo is not None:
Expand Down

0 comments on commit 4a4d3e9

Please sign in to comment.