Created
March 26, 2018 19:42
-
-
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
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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