MCPcopy
hub / github.com/agent0ai/agent-zero / apply_process_timezone

Method apply_process_timezone

helpers/localization.py:72–79  ·  view source on GitHub ↗

Apply the configured timezone to this process and child processes.

(self)

Source from the content-addressed store, hash-verified

70 return self._offset_minutes
71
72 def apply_process_timezone(self) -> None:
73 """Apply the configured timezone to this process and child processes."""
74 os.environ["TZ"] = self.timezone
75 if hasattr(time, "tzset"):
76 try:
77 time.tzset()
78 except Exception as e:
79 PrintStyle.error(f"Error applying timezone {self.timezone}: {e}")
80
81 def now(self) -> datetime:
82 """Return the current datetime in the user's configured timezone."""

Callers 3

__init__Method · 0.95
set_timezoneMethod · 0.95

Calls 1

errorMethod · 0.45

Tested by

no test coverage detected