HTTPDate

from acron.core import HTTPDate
class HTTPDate

Bases:

A container for an HTTP-legal time/date indication. This can accept a string from an HTTP header and will decode it into a C time_t value; conversely, it can accept a time_t value and encode it for output as a string.

Inheritance diagram

digraph inheritanced31a1497aa { bgcolor=transparent; rankdir=BT; size="8.0, 12.0"; "DTOOL_SUPER_BASE" [fillcolor=white,fontname="Vera Sans, DejaVu Sans, Liberation Sans, Arial, Helvetica, sans",fontsize=11,height=0.25,shape=box,style=""]; "HTTPDate" [URL="acron.core.HTTPDate.html#acron.core.HTTPDate",fillcolor=white,fontname="Vera Sans, DejaVu Sans, Liberation Sans, Arial, Helvetica, sans",fontsize=11,height=0.25,shape=box,style="",target="_top",tooltip="/**"]; "DTOOL_SUPER_BASE" -> "HTTPDate" [arrowsize=0.75,style=""]; }
__add__()
__eq__()
__gt__()
__iadd__()
__init__()

Decodes the string into a sensible date. Returns 0 (!is_valid()) if the string cannot be correctly decoded.

__isub__()
__lt__()
__ne__()
__sub__()
assign()
compare_to()

Returns a number less than zero if this HTTPDate sorts before the other one, greater than zero if it sorts after, or zero if they are equivalent.

get_string()
get_time()

Returns the date as a C time_t value.

input()
is_valid()

Returns true if the date is meaningful, or false if it is -1 (which generally indicates the source string could not be parsed.)

static now()

Returns an HTTPDate that represents the current time and date.

output()