• localtime

    From Maurice Kinal@1:2320/100 to Jame Clay on Mon Jul 11 20:56:02 2011
    Hey Jame!

    Hopefully this is the last message from me about this particular
    subject. :::knocking on wood:::

    I more or less took your advice about man pages except decided to let
    the perldoc site do all the dirty work for me and found this within http://perldoc.perl.org/functions/localtime.html;

    "$mon the month in the range 0..11, with 0 indicating January and 11
    indicating December. This makes it easy to get a month name from a list"

    That makes perfect sense but doesn't really explain the 16 bit binary
    month in FTN pkt headers or does it? Do any of your modules use the
    output from an incoming packet in that manner? Offhand I cannot really
    see it being of any real consequence but then again I haven't seen the
    value of ANY of the data within a pkt header so I might be extremely prejudiced.

    At the very least I now know why $mon is 0..11 in localtime and it has
    nothing to do with direct display of it's value and more to do with zero
    based lists, arrays, etc.

    Life is good,
    Maurice

    --- VIM - Vi IMproved 7.3 on x86_64-atom-linux-gnu
    # Origin: Pointy Stick Society (1:261/38.9)
    # Origin: LiveWire BBS -=*=- telnet://livewirebbs.com (1:2320/100)
    * Origin: LiveWire BBS - Synchronet - LiveWireBBS.com (1:2320/100)
  • From Jame Clay@1:2320/100 to Maurice Kinal on Thu Jul 14 18:05:02 2011
    Hi Maurice!

    I more or less took your advice about man pages except decided to
    let the perldoc site do all the dirty work for me

    I often find myself using that site even though I have the main Perl documentation installed locally...<g>


    and found this within
    http://perldoc.perl.org/functions/localtime.html;
    "$mon the month in the range 0..11, with 0 indicating January and 11 indicating December. This makes it easy to get a month name from a list"

    As you mentioned, that makes sense.


    That makes perfect sense but doesn't really explain the 16 bit binary
    month in FTN pkt headers or does it?

    Wasn't 16 bits the 'standard' size for an integer at the time? (And still so, for at least some systems.)


    Do any of your modules use the output from an incoming packet
    in that manner?

    In which "manner"?


    Offhand I cannot really see it being of any real consequence but
    then again I haven't seen the value of ANY of the data within a
    pkt header so I might be extremely prejudiced.

    <shrug> The packet header is basically for information above the level of they message itself, I've always thought...


    At the very least I now know why $mon is 0..11 in localtime and it has nothing to do with direct display of it's value and more to do with zero based lists, arrays, etc.

    That's what I've thought, too...




    Jame

    --- BBBS/LiI v4.01 Flag
    # Origin: Rocasa BBS (1:120/546)
    # Origin: LiveWire BBS -=*=- telnet://livewirebbs.com (1:2320/100)
    * Origin: LiveWire BBS - Synchronet - LiveWireBBS.com (1:2320/100)