Skip to content

Instantly share code, notes, and snippets.

@nm17
Created March 21, 2020 21:18
Show Gist options
  • Select an option

  • Save nm17/78a73c1e6eb9d5b86e0c19c9d622e6b1 to your computer and use it in GitHub Desktop.

Select an option

Save nm17/78a73c1e6eb9d5b86e0c19c9d622e6b1 to your computer and use it in GitHub Desktop.
import datetime
import httpx
def convert_ver():
diff = datetime.timedelta(days=10389, seconds=71340)
ver = int(httpx.post("http://sgo.cit73.ru/webapi/auth/getdata").json()["ver"])
return (datetime.datetime.fromtimestamp(ver) + diff).replace(tzinfo=pytz.FixedOffset(240))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment