Parse rfc1123, rfc850 and asctime timestamps and return UTC epoch.
(ims)
| 2964 | |
| 2965 | |
| 2966 | def parse_date(ims): |
| 2967 | """ Parse rfc1123, rfc850 and asctime timestamps and return UTC epoch. """ |
| 2968 | try: |
| 2969 | ts = email.utils.parsedate_tz(ims) |
| 2970 | return calendar.timegm(ts[:8] + (0, )) - (ts[9] or 0) |
| 2971 | except (TypeError, ValueError, IndexError, OverflowError): |
| 2972 | return None |
| 2973 | |
| 2974 | |
| 2975 | def parse_auth(header): |
no outgoing calls
no test coverage detected