• TZUTC fun...

    From Mark Lewis@1:3634/12.73 to Maurice Kinal on Sat May 18 09:53:00 2019
    export TZUTC=$(date +"%z" | sed 's/\+//')

    )\/(ark

    Always Mount a Scratch Monkey
    Do you manage your own servers? If you are not running an IDS/IPS yer doin' it wrong...
    ... Haggis: when scrapple is not disgusting enough.
    ---
    * Origin: (1:3634/12.73)
  • From Maurice Kinal@2:280/464.113 to Mark Lewis on Sat May 18 15:58:00 2019
    Hallo mark!

    export TZUTC=$(date +"%z" | sed 's/\+//')

    Yes but then $TZUTC won't work for normal dating applications as shown by using my FTN date and what would be a corrupted TZUTC since all my systems are set to UTC;

    -={ '<Esc>:read !date --date="18 May 19 15:58:01 0000"' starts }=-
    date: invalid date ‘18 May 19 15:58:01 0000’
    -={ '<Esc>:read !date --date="18 May 19 15:58:01 0000"' ends }=-

    Without the '+' character (when applicable) produces further error unless compensated for. Personally I don't trust date/time and tend to just ignore it for the mostpart, especially 2 digit year based ones. It is simpler - and I believe better - to completely ignore it rather than create a worse bug at the expense of exporting obviously corrupted data. Also, and more importantly, the TZUTC is part of the msg_body and thus by my recongning shouldn't be tinkered with even it is obviously corrupted such in the case of UTC. By simply not adding one is the correct answer methinks. However I'd be receptive to something along this line instead;

    @RFC-3339: 2019-05-18 15:58:01 +0000

    which shows a proper full date without the TZUTC corruption or the English abbreviations which cause even more grief which I won't get into here. The above kludge can be created using the strftime specifiers +"%F %T %z". So for coreutils 'date' it could look like this;

    export RFC3339=$(date --date="@${UNIXTIME}" +"%F %T %z")

    Note in the above that $unixtime is the time in seconds when this reply was set in motion = 1558195081 and is used to set the FTN datetime stamp as well. That might be a more useful kludge and could also be set to use nanoseconds for greater uniqueness as follows;

    export UNIXTIME=$(date +"%s.%N")

    My vote would be to supply the unixtime (with or without nanoseconds) and then use that to produce whatever datetime stamp the end user wishes to display the date and time at their end without having to alter the original packed message(s).

    Het leven is goed,
    Maurice

    ... Huil niet om mij, ik heb vi.
    --- GNU bash, version 5.0.7(1)-release (x86_64-pc-linux-gnu)
    * Origin: Little Mikey's EuroPoint - Ladysmith BC, Canada (2:280/464.113)
  • From Maurice Kinal@1:153/7001 to Maurice Kinal on Sat May 18 17:06:44 2019
    Hey Maurice!

    export UNIXTIME=$(date +"%s.%N")

    This reply should contain the above kludge in nanoseconds.

    Life is good,
    Maurice

    ... Don't cry for me I have vi.
    --- GNU bash, version 5.0.7(1)-release (x86_64-pc-linux-gnu)
    * Origin: Little Mikey's Brain - Ladysmith BC, Canada (1:153/7001)
  • From Maurice Kinal@2:280/464.113 to Maurice Kinal on Sat May 18 17:24:42 2019
    Hallo Maurice!

    This reply should contain the above kludge in nanoseconds.

    Technically it is in seconds. This reply should also have the kludge in seconds.

    Het leven is goed,
    Maurice

    ... Huil niet om mij, ik heb vi.
    --- GNU bash, version 5.0.7(1)-release (x86_64-pc-linux-gnu)
    * Origin: Little Mikey's EuroPoint - Ladysmith BC, Canada (2:280/464.113)
  • From Mark Lewis@1:3634/12.73 to Maurice Kinal on Sat May 18 17:44:10 2019
    On 2019 May 18 15:58:00, you wrote to me:

    export TZUTC=$(date +"%z" | sed 's/\+//')

    Yes but then $TZUTC won't work for normal dating applications as shown by using my FTN date and what would be a corrupted TZUTC since all my systems are set to UTC;

    of course... this is fidonet and it works perfectly fine for fidonet as well as being specification compliant... if one is going to process it as if it were *nix then they would need to add the '+' back in just like i removed it above... sed or awk should be able to handle it without breaking a sweat :)

    besides, there's no other software in the world other than FTN software that even knows about the TZUTC environment variable or FTN control line... all the others use TZ ;)

    </chain pulling> -=B-)

    )\/(ark

    Always Mount a Scratch Monkey
    Do you manage your own servers? If you are not running an IDS/IPS yer doin' it wrong...
    ... The weaker the defense the stronger the language.
    ---
    * Origin: (1:3634/12.73)
  • From Mark Lewis@1:3634/12.73 to Maurice Kinal on Sat May 18 17:54:10 2019
    On 2019 May 18 17:06:44, you wrote to you:

    @UNIXTIME: 1558199205.806422983
    @REPLY: 2:280/464.113 5ce02b89
    @MSGID: 1:153/7001 5ce03ba5
    @CHRS: UTF-8 4
    Hey Maurice!

    export UNIXTIME=$(date +"%s.%N")

    This reply should contain the above kludge in nanoseconds.

    it looks like it does :)

    Life is good,
    Maurice

    ... Don't cry for me I have vi.
    --- GNU bash, version 5.0.7(1)-release (x86_64-pc-linux-gnu)
    * Origin: Little Mikey's Brain - Ladysmith BC, Canada (1:153/7001) SEEN-BY: 57/0 153/757 7001 154/10 20 30 40 700 203/0 220/70 221/0 6
    227/400
    SEEN-BY: 229/426 240/5832 267/800 280/464 5003 310/31 317/2 340/800 393/68 SEEN-BY: 396/45 423/120 712/848 770/0 1 10 100 330 340 772/0 1 210 500 3634/12
    SEEN-BY: 116/116 123/25 150 755 135/300 153/7715 261/38 3634/15 27 50 123/50
    SEEN-BY: 123/115 3634/0 18/0 123/0 1/120
    @PATH: 153/7001 757 770/1 280/464 154/10 3634/12



    )\/(ark

    Always Mount a Scratch Monkey
    Do you manage your own servers? If you are not running an IDS/IPS yer doin' it wrong...
    ... Science is nothing but trained and organized common sense.
    ---
    * Origin: (1:3634/12.73)
  • From Mark Lewis@1:3634/12.73 to Maurice Kinal on Sat May 18 17:54:36 2019
    On 2019 May 18 17:24:42, you wrote to you:

    @UNIXTIME: 1558200283.593707943
    @REPLY: 1:153/7001 5ce03ba5
    @MSGID: 2:280/464.113 5ce03fdb
    @CHRS: UTF-8 4
    Hallo Maurice!

    This reply should contain the above kludge in nanoseconds.

    Technically it is in seconds. This reply should also have the kludge in seconds.

    Het leven is goed,
    Maurice

    ... Huil niet om mij, ik heb vi.
    --- GNU bash, version 5.0.7(1)-release (x86_64-pc-linux-gnu)
    * Origin: Little Mikey's EuroPoint - Ladysmith BC, Canada (2:280/464.113) SEEN-BY: 15/0 19/36 34/999 90/1 104/57 106/201 116/18 123/140 153/7715 218/700
    SEEN-BY: 222/2 230/150 152 240/1120 250/1 261/38 100 1466 266/512 267/155 SEEN-BY: 275/100 282/1031 1056 291/1 111 320/119 219 340/400 342/13 396/45 SEEN-BY: 712/848 801/161 189 2320/105 3634/12 5020/715 1042 116/116 123/25 150
    SEEN-BY: 123/755 135/300 154/10 3634/15 27 50 123/50 115 3634/0 18/0 123/0 SEEN-BY: 1/120
    @PATH: 280/464 770/1 712/848 261/38 3634/12



    )\/(ark

    Always Mount a Scratch Monkey
    Do you manage your own servers? If you are not running an IDS/IPS yer doin' it wrong...
    ... WindowError:005 Multitasking attempted. System confused.
    ---
    * Origin: (1:3634/12.73)
  • From Paul Quinn@3:640/1384 to Mark Lewis on Sun May 19 08:16:16 2019
    Hi! mark,

    On 18 May 19 09:49, you wrote to Maurice Kinal:

    export TZUTC=$(date +"%z" | sed 's/\+//')

    [//hp-junkpile/home/paul]echo $TZUTC
    1000

    :)

    Cheers,
    Paul.

    ... Cogito sumere potum alterum.
    --- GoldED+/LNX 1.1.5-b20130515
    * Origin: Quinn's Rock - Live from Paul's Xubuntu desktop! (3:640/1384)
  • From Maurice Kinal@2:280/464.113 to Mark Lewis on Sat May 18 23:05:40 2019
    Hallo mark!

    besides, there's no other software in the world other than FTN
    software that even knows about the TZUTC environment variable or
    FTN control line... all the others use TZ ;)

    I am betting it was something like the above reasoning where the "loses an i" bug got it's start.

    For the record neither $TZ nor $TZUTC output anything on any of the currently used boxes and all are set to UTC by default so it is a nonissue. It can be done though if there really is a need for any of them.

    Het leven is goed,
    Maurice

    ... Huil niet om mij, ik heb vi.
    --- GNU bash, version 5.0.7(1)-release (x86_64-pc-linux-gnu)
    * Origin: Little Mikey's EuroPoint - Ladysmith BC, Canada (2:280/464.113)
  • From Mark Lewis@1:3634/12.73 to Paul Quinn on Sat May 18 20:04:22 2019
    On 2019 May 19 08:26:16, you wrote to me:

    export TZUTC=$(date +"%z" | sed 's/\+//')

    [//hp-junkpile/home/paul]echo $TZUTC
    1000

    :)

    the main problem with TZUTC is that somehow it has to be adjusted when daylight saving switches... that's the one thing i don't like about it but it works for what it is used for ;)

    )\/(ark

    Always Mount a Scratch Monkey
    Do you manage your own servers? If you are not running an IDS/IPS yer doin' it wrong...
    ... Always listen to what experts say can't be done. Then do it.
    ---
    * Origin: (1:3634/12.73)
  • From Paul Quinn@3:640/1384 to Mark Lewis on Sun May 19 11:59:16 2019
    Hi! mark,

    On 18 May 19 20:00, you wrote to me:

    the main problem with TZUTC is that somehow it has to be adjusted when daylight saving switches... that's the one thing i don't like about it
    but it works for what it is used for ;)

    IIRC, European states are re-thinking the notion of DST. Similar thought exercises are pregressing here as well. Who knows; maybe commonsense will prevail. ;)

    Cheers,
    Paul.

    ... Blonde Borgs all have the same fun.
    --- GoldED+/LNX 1.1.5-b20130515
    * Origin: Quinn's Rock - Live from Paul's Xubuntu desktop! (3:640/1384)