MCPcopy Index your code
hub / github.com/python-pendulum/pendulum / astimezone

Method astimezone

src/pendulum/datetime.py:1275–1288  ·  view source on GitHub ↗
(self, tz: datetime.tzinfo | None = None)

Source from the content-addressed store, hash-verified

1273 return cls.instance(datetime.datetime.combine(date, time), tz=tzinfo)
1274
1275 def astimezone(self, tz: datetime.tzinfo | None = None) -> Self:
1276 dt = super().astimezone(tz)
1277
1278 return self.__class__(
1279 dt.year,
1280 dt.month,
1281 dt.day,
1282 dt.hour,
1283 dt.minute,
1284 dt.second,
1285 dt.microsecond,
1286 fold=dt.fold,
1287 tzinfo=dt.tzinfo,
1288 )
1289
1290 def replace(
1291 self,

Callers 5

nowMethod · 0.80
convertMethod · 0.80
convertMethod · 0.80
test_astimezoneFunction · 0.80
test_astimezoneFunction · 0.80

Calls

no outgoing calls

Tested by 2

test_astimezoneFunction · 0.64
test_astimezoneFunction · 0.64