Skip to content

Instantly share code, notes, and snippets.

@jmvrbanac
Created March 26, 2018 19:42
Show Gist options
  • Save jmvrbanac/9d2b83015479b06d17eda19bac56543a to your computer and use it in GitHub Desktop.
Save jmvrbanac/9d2b83015479b06d17eda19bac56543a to your computer and use it in GitHub Desktop.
Quick and dirty way to help find the right point in time for a reconcile
import maya
from datetime import timedelta
def lookup_subtracted_time(days, hours, minutes):
delta = timedelta(days=days, hours=hours, minutes=minutes)
backdate = (maya.now() - delta).datetime()
localtime = backdate.astimezone(maya.get_localzone())
return localtime.isoformat(), delta.total_seconds() / 60
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment