Skip to content

Commit

Permalink
Add pydoc and address comments
Browse files Browse the repository at this point in the history
  • Loading branch information
Leo Li committed Apr 14, 2021
1 parent bf43552 commit 31ca7a4
Showing 1 changed file with 9 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -15,10 +15,17 @@
from msrest.serialization import TZ_UTC
from azure.core.credentials import AccessToken

"""
Converts DateTime in local time to the Epoch in UTC in second.
:param input_datetime: Input datetime
:type input_datetime: datetime
:return: Integer
:rtype: int
"""
def _convert_datetime_to_utc_int(expires_on):
epoch = time.localtime().tm_gmtoff
return time.mktime(expires_on.timetuple()) + epoch
offset_from_utc = time.localtime().tm_gmtoff
return time.mktime(expires_on.timetuple()) + offset_from_utc

def parse_connection_str(conn_str):
# type: (str) -> Tuple[str, str, str, str]
Expand Down

0 comments on commit 31ca7a4

Please sign in to comment.