Ejemplo n.º 1
0
 def process_bind_param(self, value, dialect=None):
     """
     Convert an integer timestamp (specifying number of seconds or
     miliseconds since UNIX epoch) to MediaWiki timestamp format.
     """
     if not value:
         return None
     if isinstance(value, datetime):
         value = format_date(value)
     #if hasattr(value, 'decode'):
         #value = value.decode('utf-8')
     return unicode(value)
Ejemplo n.º 2
0
def i(date_object):
    """
    helper function to convert dates into integers representing mediawiki timestamps
    """
    return int(format_date(date_object))
Ejemplo n.º 3
0
def i(date_object):
    """
    helper function to convert dates into integers representing mediawiki timestamps
    """
    return int(format_date(date_object))