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

Method in_tz

src/pendulum/datetime.py:357–361  ·  view source on GitHub ↗

Set the instance's timezone from a string or object.

(self, tz: str | Timezone | FixedTimezone)

Source from the content-addressed store, hash-verified

355 return tz.convert(dt)
356
357 def in_tz(self, tz: str | Timezone | FixedTimezone) -> Self:
358 """
359 Set the instance's timezone from a string or object.
360 """
361 return self.in_timezone(tz)
362
363 # STRING FORMATTING
364

Callers 10

p1Function · 0.80
test_in_tzFunction · 0.80
test_now_dst_offFunction · 0.80
test_now_dst_onFunction · 0.80

Calls 1

in_timezoneMethod · 0.95

Tested by 10

p1Function · 0.64
test_in_tzFunction · 0.64
test_now_dst_offFunction · 0.64
test_now_dst_onFunction · 0.64