MCPcopy Create free account
hub / github.com/pgadmin-org/pgadmin4 / localize

Method localize

web/pgadmin/misc/bgprocess/process_executor.py:117–121  ·  view source on GitHub ↗

Convert naive time to local time

(self, dt)

Source from the content-addressed store, hash-verified

115 return _ZERO
116
117 def localize(self, dt):
118 """Convert naive time to local time"""
119 if dt.tzinfo is not None:
120 raise ValueError('Not naive datetime (tzinfo is already set)')
121 return dt.replace(tzinfo=self)
122
123 def normalize(self, dt):
124 """Correct the timezone information on the given datetime"""

Callers 1

fromutcMethod · 0.95

Calls

no outgoing calls

Tested by

no test coverage detected