Created
April 10, 2014 14:50
-
-
Save btorch/10390451 to your computer and use it in GitHub Desktop.
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
| #!/usr/bin/python | |
| import sys | |
| import time | |
| def get_trans_id_time(trans_id): | |
| if len(trans_id) >= 34 and trans_id[:2] == 'tx' and trans_id[23] == '-': | |
| try: | |
| return int(trans_id[24:34], 16) | |
| except ValueError: | |
| pass | |
| return None | |
| t = get_trans_id_time(sys.argv[1]) | |
| print t, time.asctime(time.gmtime(t)) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment