TIP: Click on subject to list as thread! ANSI
echo: linux
to: WILFRED VAN VELZEN
from: MARK LEWIS
date: 2015-10-07 06:41:00
subject: it is still wrong even if

07 Oct 15 08:55, you wrote to me:

 WV>>>>> Your almost right. It advertises -0500 but because of DST it
 WV>>>>> should be -0400. ;)

 ml>>>> that happens because in all cases i'm aware of, the operator has to
 ml>>>> flip the switch... my main system uses an environment variable for
 ml>>>> this information... i wrote a tool which automatically adjusts the
 ml>>>> value in the environment variable when DST turns on and off... some
 ml>>>> systems require a reboot for the change to take effect because of
 ml>>>> where the information is stored in environment variables and
 ml>>>> whether they can be changed from a shell or not... if i had to
 ml>>>> guess, i'd guess that janis simply forgot to adjust when the switch
 ml>>>> took place last time...

 WV>>> On linux it's certainly automatic, and Janis uses linux...

 ml>> really? linux creates and maintains the TZUTC environment variable??
 ml>> that's quite some news to me and many others!

 WV> (You might mean the TZ env var?)

nope... i mean the TZUTC environment variable... if it exists, some (FTN
specific) software will use it for the TZUTC control line... without it, the
control line may not appear...

 WV> But you don't need it. Basically you can ask the OS what the localtime
 WV> is and what the gmtime is. The difference is what you need for the
 WV> TZUTC kludge. At least that is what Golded does. I haven't set it on
 WV> either my windows or linux setup, yet the TZUTC is calculated
 WV> perfectly!

interesting... but that's only one program and one running on a system that has
that capability, right? how does one calculate TZUTC on a pure DOS machine? how
about OS/2?

FWIW: i danced this dance long ago... my solution was to borrow from novell and
create two other environment variables... DSTSTART and DSTSTOP... they operate
in the same manner as the similar ones in novell's early networking stuff...

eg:
  set DSTSTART=second sunday in march at 2:00
  set DSTSTOP=first sunday in november at 2:00
  set TZ=EST5EDT,3,2,0,7200,11,1,0,7200,3600

and then i have a (combination of) tool(s) that determines the current day and
figures out if it is between the DSTSTART and DSTSTOP values... depending on
the result of that decision and the output of the program, the TZUTC
environment variable value is set accordingly... granted, it will be wrong if
the clock is wrong but that's all there is to work with... yeah, the binary
tool can also calculate gmtime...

)\/(ark

... Ronald McDonald grinningly luring kids into chemical/fat addictions.
---
* Origin: (1:3634/12.73)

SOURCE: echomail via QWK@docsplace.org

Email questions or comments to sysop@ipingthereforeiam.com
All parts of this website painstakingly hand-crafted in the U.S.A.!
IPTIA BBS/MUD/Terminal/Game Server List, © 2025 IPTIA Consulting™.