TZ is a Unix environment variable that tells programs which time zone to use when converting or displaying times. It can affect how timestamps are parsed, compared, and rendered, especially in software that relies on local-time interpretation instead of explicit UTC offsets.
In cyber security, TZ matters because time is often part of authorization logic, logging, and policy enforcement. If a privileged program trusts the caller’s environment, an attacker may be able to influence how date-based rules are evaluated. That can shift maintenance windows, bypass time-limited access controls, or create misleading audit records. Defenders reduce this risk by sanitizing inherited environment variables, using explicit time zones in security-sensitive code, and preferring UTC for policy decisions and logs.


