How to use the rfc3339.datetimetostr function in rfc3339

To help you get started, we’ve selected a few rfc3339 examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github tantalor / emend / emend / template.py View on Github external
def rfc3339(datetime):
  return datetime_to_rfc3339(datetime)
github tantalor / emend / app / main.py View on Github external
from google.appengine.ext.webapp import WSGIApplication
from google.appengine.ext.webapp.util import run_wsgi_app

from emend import RequestHandler
from emend.diff import diff, diff_src, diff_dst
from rfc3339 import datetimetostr as rfc3339
from urllib import quote
from megaera import get_jinja2_env

jinja2_env = get_jinja2_env()
jinja2_env.filters['quote'] = lambda s: quote(s.encode('utf8'))
jinja2_env.globals['diff'] = diff
jinja2_env.globals['diff_src'] = diff_src
jinja2_env.globals['diff_dst'] = diff_dst
jinja2_env.filters['rfc3339'] = rfc3339

def routes():
  return yaml.load(file('routes.yaml'))

def handlers():
  return [(path, handler) for (path, handler) in [
    RequestHandler.path_with_page(path, page)
    for (path, page) in routes()
  ] if handler]

application = WSGIApplication(handlers(), debug=True)

rfc3339

Format dates according to the RFC 3339.

ISC
Latest version published 5 years ago

Package Health Score

49 / 100
Full package analysis