Created
February 4, 2016 15:52
-
-
Save mcotton/e254caf04c166874c7bb to your computer and use it in GitHub Desktop.
Working with dates in arrow and gae
This file contains 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
# reference issue for making it work on GAE | |
# https://github.com/crsmithdev/arrow/issues/240 | |
import os | |
import pprint | |
from google.appengine.api import memcache | |
from google.appengine.api import mail | |
from google.appengine.api import urlfetch | |
from google.appengine.ext import ndb | |
from google.appengine.api import search | |
from core.models import * | |
import datetime | |
import arrow | |
import datetime | |
TZ = 'US/Central' | |
#u = User.get_by_id(5865619656278016) | |
u = User.query(User.email=="blah@huvrdata.com").fetch(1) | |
ll = arrow.get(u[0].last_login) | |
pprint.pprint(u[0].last_login) | |
pprint.pprint(str(ll.to(TZ))) | |
pprint.pprint(ll.humanize()) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment