Skip to content

Instantly share code, notes, and snippets.

@pelle
Created June 1, 2009 02:01
Show Gist options
  • Save pelle/121133 to your computer and use it in GitHub Desktop.
Save pelle/121133 to your computer and use it in GitHub Desktop.
#!/usr/bin/env python
import hashlib, urllib, time
def digest( content ):
return hashlib.sha1( content ).hexdigest()
def timecert( content):
url = "http://timecert.org/%s.time"%digest(content)
timestamp = urllib.urlopen( url ).read()
return time.strptime(timestamp,"%a %b %d %H:%M:%S %Z %Y")
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment