Apply the configured timezone to this process and child processes.
(self)
| 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.""" |
no test coverage detected