MCPcopy
hub / github.com/pydata/xarray / _maybe_strip_tz_from_timestamp

Function _maybe_strip_tz_from_timestamp

xarray/coding/times.py:290–295  ·  view source on GitHub ↗
(date: pd.Timestamp)

Source from the content-addressed store, hash-verified

288
289
290def _maybe_strip_tz_from_timestamp(date: pd.Timestamp) -> pd.Timestamp:
291 # If the ref_date Timestamp is timezone-aware, convert to UTC and
292 # make it timezone-naive (GH 2649).
293 if date.tz is not None:
294 return date.tz_convert("UTC").tz_convert(None)
295 return date
296
297
298def _cast_timestamp_to_coarsest_resolution(timestamp: pd.Timestamp) -> pd.Timestamp:

Callers 1

Calls

no outgoing calls

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…