Elektrine lite

← Feed

@meluzzy@woof.tech

Post #4211016

2026-07-29 18:34 UTC

Why are the signs of $TZ for UTC time reversed? UTC+06:00 returns -06:00 UTC-06:00 returns +06:00 #debian #linux

Replies (1)

  • @ds@infosec.exchange 2026-07-29 19:56

    @meluzzy@woof.tech this is probably a bit circular, but specifying the timezone like that in $TZ is a more complicated format which allows specifying daylight savings offsets and dates. In this format the offset "...specifies the time value to be added to the local time to get Coordinated Universal Time (UTC)" (From tzset(3) manpage @ https://linux.die.net/man/3/tzset) I realise it's a pretty circular answer to your question - it's reversed because that's how it's defined - but being part of a more complex specification maybe helps make sense of it!

    Open ##4211015