(
cls, t: time, tz: str | Timezone | FixedTimezone | datetime.tzinfo | None = UTC
)
| 36 | |
| 37 | @classmethod |
| 38 | def instance( |
| 39 | cls, t: time, tz: str | Timezone | FixedTimezone | datetime.tzinfo | None = UTC |
| 40 | ) -> Self: |
| 41 | tz = t.tzinfo or tz |
| 42 | |
| 43 | if tz is not None: |
| 44 | tz = pendulum._safe_timezone(tz) |
| 45 | |
| 46 | return cls(t.hour, t.minute, t.second, t.microsecond, tzinfo=tz, fold=t.fold) |
| 47 | |
| 48 | # String formatting |
| 49 | def __repr__(self) -> str: |
no outgoing calls