Return a time instance based on the input string and the format string.
(cls, data_string, format="%H:%M:%S")
| 798 | return datetime_timezone(tzdelta) |
| 799 | |
| 800 | def _strptime_datetime_time(cls, data_string, format="%H:%M:%S"): |
| 801 | """Return a time instance based on the input string and the |
| 802 | format string.""" |
| 803 | tt, fraction, gmtoff_fraction = _strptime(data_string, format) |
| 804 | tzname, gmtoff = tt[-2:] |
| 805 | args = tt[3:6] + (fraction,) |
| 806 | if gmtoff is None: |
| 807 | return cls(*args) |
| 808 | else: |
| 809 | tz = _parse_tz(tzname, gmtoff, gmtoff_fraction) |
| 810 | return cls(*args, tz) |
| 811 | |
| 812 | def _strptime_datetime_datetime(cls, data_string, format="%a %b %d %H:%M:%S %Y"): |
| 813 | """Return a datetime instance based on the input string and the |