예제 #1
0
def http_date(timestamp=None):
    """Formats the time to match the RFC1123 date format.

    Accepts a floating point number expressed in seconds since the epoch in, a
    datetime object or a timetuple.  All times in UTC.  The :func:`parse_date`
    function can be used to parse such a date.

    Outputs a string in the format ``Wdy, DD Mon YYYY HH:MM:SS GMT``.

    :param timestamp: If provided that date is used, otherwise the current.
    """
    return _dump_date(timestamp, ' ')
예제 #2
0
파일: utils.py 프로젝트: bguided/synctester
def http_date(timestamp=None):
    """Formats the time to match the RFC1123 date format.

    Accepts a floating point number expressed in seconds since the epoc in, a
    datetime object or a timetuple.  All times in UTC.  The :func:`parse_date`
    function can be used to parse such a date.

    Outputs a string in the format ``Wdy, DD Mon YYYY HH:MM:SS GMT``.

    :param timestamp: If provided that date is used, otherwise the current.
    """
    return _dump_date(timestamp, ' ')
예제 #3
0
def cookie_date(expires = None):
    """Formats the time to ensure compatibility with Netscape's cookie
    standard.
    
    Accepts a floating point number expressed in seconds since the epoch in, a
    datetime object or a timetuple.  All times in UTC.  The :func:`parse_date`
    function can be used to parse such a date.
    
    Outputs a string in the format ``Wdy, DD-Mon-YYYY HH:MM:SS GMT``.
    
    :param expires: If provided that date is used, otherwise the current.
    """
    return _dump_date(expires, '-')
예제 #4
0
파일: utils.py 프로젝트: bguided/synctester
def cookie_date(expires=None):
    """Formats the time to ensure compatibility with Netscape's cookie
    standard.

    Accepts a floating point number expressed in seconds since the epoc in, a
    datetime object or a timetuple.  All times in UTC.  The :func:`parse_date`
    function can be used to parse such a date.

    Outputs a string in the format ``Wdy, DD-Mon-YYYY HH:MM:SS GMT``.

    :param expires: If provided that date is used, otherwise the current.
    """
    return _dump_date(expires, '-')
예제 #5
0
def http_date(timestamp=None):
    return _dump_date(timestamp, ' ')
예제 #6
0
def cookie_date(expires=None):
    return _dump_date(expires, '-')
예제 #7
0
파일: utils.py 프로젝트: Pluckyduck/eve
def http_date(timestamp = None):
    return _dump_date(timestamp, ' ')
예제 #8
0
파일: utils.py 프로젝트: Pluckyduck/eve
def cookie_date(expires = None):
    return _dump_date(expires, '-')