MCPcopy Index your code
hub / github.com/sqlmapproject/sqlmap / http_date

Function http_date

thirdparty/bottle/bottle.py:3348–3361  ·  view source on GitHub ↗
(value)

Source from the content-addressed store, hash-verified

3346
3347
3348def http_date(value):
3349 if isinstance(value, basestring):
3350 return value
3351 if isinstance(value, datetime):
3352 # aware datetime.datetime is converted to UTC time
3353 # naive datetime.datetime is treated as UTC time
3354 value = value.utctimetuple()
3355 elif isinstance(value, datedate):
3356 # datetime.date is naive, and is treated as UTC time
3357 value = value.timetuple()
3358 if not isinstance(value, (int, float)):
3359 # convert struct_time in UTC to UNIX timestamp
3360 value = calendar.timegm(value)
3361 return email.utils.formatdate(value, usegmt=True)
3362
3363
3364def parse_date(ims):

Callers 2

BaseResponseClass · 0.85
set_cookieMethod · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…