On Wed, Apr 1, 2015 at 4:48 AM, Anselm Lingnau
<[email protected]> wrote:
> Bryan J Smith wrote:
>> Legacy kinda like the POSIX "TZ" environment is still there, even
>> though it is strongly recommended to _never_ set it at all.
>
> I don't buy this. How do you propose a user should set a different time
> zone from the system time zone?

Don't know.

Unfortunately the iEEE/TheOpenGroup Austin et al. Working Groups
always did a poor job of addressing this.  This may have changed in
the last couple of years, but even in the '00s, it was poorly
implemented consistently across most POSIX platforms.

E.g., setting a Zoneinfo path in the TZ environment for an user does
not always work.

In general, the only time one should set TZ is for UTC.  Otherwise,
leave it blank if at all possible.

This is a long-standing application/POSIX issue.  Because applications
should offer a way, and TZ has such a poor history of inconsistency in
implementation, even in the age of Zoneinfo.  And nothing else has
been done well.

> E.g., because a user in Australia is
> ssh'ing into a machine that is in the UK, with the system time zone set
> to “Europe/London”, but still wants to see times and dates according to
> their local timezone.

Oh, it's a bigger issue than "wants to see times."  It's a major
future event/scheduling issue.

Because when it comes to scheduling, it's most ideal to set future
events in localtime, and not UTC.  Because most future events are to
localtime, not UTC, especially if the offset changes for the Zone
between now and the event.

Both Lotus and Microsoft got caught by that in 2007.  It's sad,
because being on the Zoneinfo list for over a decade, you'd be
surprised how much Zones do very much change!  In some nations, they
don't even set their daylight savings date until the weeks before!

> The “timedatectl” command (or for that matter the “tzconfig” command)
> doesn't seem to support that idea.

Wholly inapplicable.  That's only for setting /etc/localtime, RTC, and
related, system-wide stuff.

Again, user environment has never been standardized well for Zoneinfo.
Which is why, if at all possible, either avoid setting TZ, or set it
to UTC.  Even today, even if the shell works correct with a Zoneinfo
path -- of which there are variations (e.g., most Solaris releases
prefer if you preface it with colon, ":") -- there are so many
applications that will disagree.

This has been a long-standing issue that the standards bodies have not
been able to address and proliferate well.

-- bjs
_______________________________________________
lpi-examdev mailing list
[email protected]
http://list.lpi.org/cgi-bin/mailman/listinfo/lpi-examdev

Reply via email to