by steerablesafe · 5y ago · 0 comments
It truncated the name because of the underscores, but you can do `TZ=somerandomthing date` to see it just reports what you say it is.
If `TZ=EST date` adjusts the offset to EST, then a reasonable person would expect `TZ=EDT date` to either adjust the offset to EDT, or fail noisily if it's not aware of that offset code.
At a skim through the documentation I don't see anything warning about it's current behaviour.
But it is aware of it! You just told it, using the TZ variable, what EDT is. It's a timezone called EDT, with no offset from UTC!
If you wanted an offset, you should have written `TZ=EDT+4 date`
> But it is aware of it! You just told it
The user didn't intend to. Defining a new offset code should be explicit, not a silent fall-back when it's unable to find EDT.
sane: report an error in some hard to ignore form
less sane: ignore the provided timezone, display the time in UTC and properly mark it with "UTC"
insane: ignore the provided timezone, display the time in UTC, but then mark it with the prefix of the provided timezone anyway.
I don't care how well documented the insane behavior is, it's still insane.
If you set your machine to something weird, then expect the utility that reports on those settings to report the weird settings you set.