This recipe will help you parse datetime strings returned by HTTP servers following the RFC 2616 standard (which supports three datetime formats). Credit for this recipe goes to ΤΖΩΤΖΙΟΥ.
Python, 5 lines
1 2 3 4 5
from datetime import datetime from email.utils import parsedate def _parse_http_datetime(s): return datetime(*parsedate(s)[:6])
This is just a test comment; testing code deployment ...