HTTPDate

from panda3d.core import HTTPDate
class HTTPDate

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

Inheritance diagram of HTTPDate

__add__(seconds: int)HTTPDate
__eq__(other: HTTPDate)bool
__gt__(other: HTTPDate)bool
__iadd__(seconds: int)HTTPDate
__init__()
__init__(copy: HTTPDate)
__init__(format: str)

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

__init__(time: int)
__isub__(seconds: int)HTTPDate
__lt__(other: HTTPDate)bool
__ne__(other: HTTPDate)bool
__sub__(other: HTTPDate)int
__sub__(seconds: int)HTTPDate
assign(copy: HTTPDate)HTTPDate
compareTo(other: HTTPDate)int

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.

getString()str
getTime()int

Returns the date as a C time_t value.

input(in: istream)bool
isValid()bool

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()HTTPDate

Returns an HTTPDate that represents the current time and date.

output(out: ostream)None