On Fri, Aug 12, 2022 at 12:18:20PM +0200, Uwe Kleine-König wrote:
uwe@taurus:/usr/share/zoneinfo$ TZ=Europe/London date
Fri Aug 12 11:13:34 AM BST 2022
uwe@taurus:/usr/share/zoneinfo$ TZ=BST date
Fri Aug 12 10:13:38 AM BST 2022

The first one is the right one, but there is no way to determine the
latter to be wrong. Apart from the offset the output is identical and if
you're not aware that TZ=BST is wrong you have no chance to notice that.

If it at least said "Fri Aug 12 11:13:38 AM UTC 2022" or (better yet)
dies with an error code that would be highly convenient.

It would also be non-compliant with the standard. I'll pile on with what everyone else said, and repeat that the only practical solution is to not do what you're doing because the functionality is fundamentally unreliable. The ideal solution would be to drop support for three letter timezone codes entirely, but that's untenable from a compatibility standpoint.

Reply via email to