Created
September 28, 2012 15:54
-
-
Save sligodave/3800648 to your computer and use it in GitHub Desktop.
Revisions
-
sligodave created this gist
Sep 28, 2012 .There are no files selected for viewing
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 charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,23 @@ import datetime # Time is Central! d = datetime.datetime(2012, 9, 26, 14, 00) # So we can convert our times to Pacific time dt = datetime.timedelta(hours=2) from django.contrib.auth.models import User # Users who have logged in since that time ut = User.objects.filter(last_login__gte=d).order_by('last_login').values_list('username', 'last_login') for u, t in ut: t = (t-td).isoformat() t = t[t.find('T') + 1:] t = t[:t.find('.')] print t, u1