Return a time instance based on the input string and the format string.
(cls, data_string, format="%H:%M:%S")
| 816 | return datetime_timezone(tzdelta) |
| 817 | |
| 818 | def _strptime_datetime_time(cls, data_string, format="%H:%M:%S"): |
| 819 | """Return a time instance based on the input string and the |
| 820 | format string.""" |
| 821 | tt, fraction, gmtoff_fraction = _strptime(data_string, format) |
| 822 | tzname, gmtoff = tt[-2:] |
| 823 | args = tt[3:6] + (fraction,) |
| 824 | if gmtoff is None: |
| 825 | return cls(*args) |
| 826 | else: |
| 827 | tz = _parse_tz(tzname, gmtoff, gmtoff_fraction) |
| 828 | return cls(*args, tz) |
| 829 | |
| 830 | def _strptime_datetime_datetime(cls, data_string, format="%a %b %d %H:%M:%S %Y"): |
| 831 | """Return a datetime instance based on the input string and the |