• system.compiled_when property

    From Nightfox@VERT/DIGDIST to Digital Man on Fri May 17 02:16:06 2013
    Hi DM,

    I saw that the bbs.compiled_when property is a string that contains the date when Synchronet was compiled. I noticed that it's in the following format:
    May 12 2013 05:02
    Is it always in that format with month names in English, regardless of the system's region and language settings?

    Nightfox

    ---
    þ Synchronet þ Digital Distortion BBS - digitaldistortionbbs.com
  • From art@VERT/FATCATS to Nightfox on Fri May 17 18:39:01 2013
    Re: system.compiled_when property
    By: Nightfox to Digital Man on Thu May 16 2013 19:16:06

    Ahoy Nightfox,

    I saw that the bbs.compiled_when property is a string that contains the
    date when Synchronet was compiled. I noticed that it's in the following format: May 12 2013 05:02
    Is it always in that format with month names in English, regardless of the system's region and language settings?

    Apparently, yes. I'm on European time and region, and I get the following
    with system.compiled_when, as your subject:

    C:\sbbs\mods\testing\compiled_when.js compiled in 0.00 seconds
    May 8 2013 05:02

    Kind regards,

    art@fatcatsbbsdotcom

    Picard: "Counselor Deanna Troi is pregnant. She..She is going to have a baby." Riker: "A baby? .. This is a surprise."
    Troi: "More so for me."
    -- Picard, Riker and Troi in ST:TNG "The Child"

    ---
    þ Synchronet þ fatcats bbs - fatcatsbbs.com
  • From Nightfox@VERT/DIGDIST to art on Sat May 18 02:21:06 2013
    Re: system.compiled_when property
    By: art to Nightfox on Fri May 17 2013 11:39:01

    I saw that the bbs.compiled_when property is a string that contains
    the date when Synchronet was compiled. I noticed that it's in the
    following format: May 12 2013 05:02
    Is it always in that format with month names in English, regardless of
    the system's region and language settings?

    Apparently, yes. I'm on European time and region, and I get the following with system.compiled_when, as your subject:

    C:\sbbs\mods\testing\compiled_when.js compiled in 0.00 seconds
    May 8 2013 05:02

    Good to know, and thanks for verifying (I wasn't sure if it would be "8 May 2013" for the UK, for instance).

    Nightfox

    ---
    þ Synchronet þ Digital Distortion BBS - digitaldistortionbbs.com
  • From Nightfox@VERT/DIGDIST to All on Sat May 18 03:29:24 2013
    Re: system.compiled_when property
    By: Nightfox to Digital Man on Thu May 16 2013 19:16:06

    I saw that the bbs.compiled_when property is a string that contains the date when Synchronet was compiled. I noticed that it's in the following format: May 12 2013 05:02
    Is it always in that format with month names in English, regardless of the system's region and language settings?

    Looking more into this, I checked the Synchronet source code.. In sbbs3\js_system.c, there is this line, which looks to set up the bbs.compiled_when property:
    LAZY_STRFUNC("compiled_when", sprintf(str,"%s %.5s",__DATE__,__TIME__), str);

    So I'd think it depends on how the compiler formats the string stored in the __DATE__ macro. And it sounds like a fairly safe bet (at least for GCC and Microsoft Visual C++) that it will always be formatted as "Mmm dd yyyy".

    From the GCC documentation:
    __DATE__
    This macro expands to a string constant that describes the date on which the preprocessor is being run. The string constant contains eleven characters and looks like "Feb 12 1996". If the day of the month is less than 10, it is padded with a space on the left.
    If GCC cannot determine the current date, it will emit a warning message (once per compilation) and __DATE__ will expand to "??? ?? ????".

    From Microsoft's MSDN documentation for __DATE__:
    The compilation date of the current source file. The date is a string literal of the form Mmm dd yyyy. The month name Mmm is the same as for dates generated by the library function asctime declared in TIME.H.

    Nightfox

    ---
    þ Synchronet þ Digital Distortion BBS - digitaldistortionbbs.com
  • From Digital Man@VERT to Nightfox on Mon May 20 19:41:28 2013
    Re: system.compiled_when property
    By: Nightfox to Digital Man on Thu May 16 2013 07:16 pm

    Hi DM,

    I saw that the bbs.compiled_when property is a string that contains the
    date when Synchronet was compiled. I noticed that it's in the following format: May 12 2013 05:02
    Is it always in that format with month names in English, regardless of the system's region and language settings?

    Yes. It's a build-time string and the C standard dictates the format.

    Now, this is the date/time the executable was built, it does not tell you that it's "v3.16a" for example. You could build v3.15b today and the compiled_when property would contain today's date, but the version of the source would still be an older one.

    digital man

    Synchronet "Real Fact" #35:
    Synchronet's Windows DLLs are built with Microsoft Visual Studio/C++.
    Norco, CA WX: 78.9øF, 47.0% humidity, 6 mph NW wind, 0.00 inches rain/24hrs

    ---
    þ Synchronet þ Vertrauen þ Home of Synchronet þ [vert/cvs/bbs].synchro.net
  • From Digital Man@VERT to Nightfox on Mon May 20 19:43:32 2013
    Re: system.compiled_when property
    By: Digital Man to Nightfox on Mon May 20 2013 12:41 pm

    Re: system.compiled_when property
    By: Nightfox to Digital Man on Thu May 16 2013 07:16 pm

    Hi DM,

    I saw that the bbs.compiled_when property is a string that contains the date when Synchronet was compiled. I noticed that it's in the following format: May 12 2013 05:02
    Is it always in that format with month names in English, regardless of the system's region and language settings?

    Yes. It's a build-time string and the C standard dictates the format.

    Now, this is the date/time the executable was built, it does not tell you that it's "v3.16a" for example. You could build v3.15b today and the compiled_when property would contain today's date, but the version of the source would still be an older one.

    Rather than basing your decision to use bbs.msg_number on the build date, why not check to see if it's non-zero? A zero message number is never valid. Just fall back to the previous behavior if the message number is zero.

    digital man

    Synchronet "Real Fact" #61:
    Name of Synchronet PCMS compiler/language "Baja" was coined by Michael Swindell.
    Norco, CA WX: 78.9øF, 47.0% humidity, 6 mph NW wind, 0.00 inches rain/24hrs

    ---
    þ Synchronet þ Vertrauen þ Home of Synchronet þ [vert/cvs/bbs].synchro.net
  • From Nightfox@VERT/DIGDIST to Digital Man on Tue May 21 02:57:05 2013
    Re: system.compiled_when property
    By: Digital Man to Nightfox on Mon May 20 2013 12:41:28

    Now, this is the date/time the executable was built, it does not tell you that it's "v3.16a" for example. You could build v3.15b today and the compiled_when property would contain today's date, but the version of the source would still be an older one.

    Yep. I thought about that, so I'm checking that the version is at least 3.16 (system.version_num >= 31600) and that the build date is at least May 12, 2013 before using bbs.msg_number. Otherwise, it reverts back to the previous behavior of using the message offset (bbs.smb_curmsg).

    Eric

    ---
    þ Synchronet þ Digital Distortion BBS - digitaldistortionbbs.com
  • From Nightfox@VERT/DIGDIST to Digital Man on Tue May 21 02:57:39 2013
    Re: system.compiled_when property
    By: Digital Man to Nightfox on Mon May 20 2013 12:43:32

    Rather than basing your decision to use bbs.msg_number on the build date, why not check to see if it's non-zero? A zero message number is never valid. Just fall back to the previous behavior if the message number is zero.

    Ah, I suppose I could do that. I didn't know 0 would be an invalid message number.

    Nightfox

    ---
    þ Synchronet þ Digital Distortion BBS - digitaldistortionbbs.com
  • From Nightfox@VERT/DIGDIST to Digital Man on Tue May 21 03:51:27 2013
    Re: system.compiled_when property
    By: Nightfox to Digital Man on Mon May 20 2013 19:57:39

    Ah, I suppose I could do that. I didn't know 0 would be an invalid message number.

    Looking back at the related messages, you did say bbs.msg_number is 1-based. I think it's a better option to check for that rather than checking the version and build date of Synchronet.

    Nightfox

    ---
    þ Synchronet þ Digital Distortion BBS - digitaldistortionbbs.com
  • From Nightfox@VERT/DIGDIST to Digital Man on Tue May 21 05:01:24 2013
    Re: system.compiled_when property
    By: Digital Man to Nightfox on Mon May 20 2013 12:43:32

    Rather than basing your decision to use bbs.msg_number on the build date, why not check to see if it's non-zero? A zero message number is never valid. Just fall back to the previous behavior if the message number is zero.

    I was going to do that, but then I realized that when I use my message lister to read and reply to a message (rather than using one of Synchronet's built-in ways to read a message), bbs.msg_number is 0 in that case. I've tried having my message lister set bbs.msg_number to the number property in the message header, but that doesn't actually set bbs.msg_number. I suppose the properties of the bbs object are read-only, and I can understand why. My solution was to have my message lister write its own drop file containing the message offset/number and to have SlyEdit read that file if it exists. Currently,
    both SlyEdit and my message lister check the Synchronet version and build
    date to decide whether to use the message number or offset, and that's working for now. It would be nice if there was a more elegant way to do it though.

    Nightfox

    ---
    þ Synchronet þ Digital Distortion BBS - digitaldistortionbbs.com
  • From Digital Man@VERT to Nightfox on Wed May 22 19:08:10 2013
    Re: system.compiled_when property
    By: Nightfox to Digital Man on Mon May 20 2013 08:51 pm

    Re: system.compiled_when property
    By: Nightfox to Digital Man on Mon May 20 2013 19:57:39

    Ah, I suppose I could do that. I didn't know 0 would be an invalid message number.

    Looking back at the related messages, you did say bbs.msg_number is
    1-based. I think it's a better option to check for that rather than checking the version and build date of Synchronet.

    I agree.

    digital man

    Synchronet "Real Fact" #25:
    The Synchronet Web Server was written predominantly by Stephen Hurd (Deuce). Norco, CA WX: 69.7øF, 62.0% humidity, 10 mph NW wind, 0.00 inches rain/24hrs

    ---
    þ Synchronet þ Vertrauen þ Home of Synchronet þ [vert/cvs/bbs].synchro.net
  • From Nightfox@VERT/DIGDIST to Digital Man on Fri May 24 03:49:35 2013
    Re: system.compiled_when property
    By: Digital Man to Nightfox on Wed May 22 2013 12:08:10

    Looking back at the related messages, you did say bbs.msg_number is
    1-based. I think it's a better option to check for that rather than
    checking the version and build date of Synchronet.

    I agree.

    I've updated SlyEdit to check bbs.msg_number that way rather than checking the Synchronet verison & build date.

    I also updated Digital Distortion Message Lister to make it compatible with this verison of SlyEdit. So sysops updating to the latest SlyEdit who use Digital Distortion Message Lister should also download version 1.36 of the message lister: http://www.digitaldistortionbbs.com/DigDistBBSStuff/DigDistBBSStuff.html

    Nightfox

    ---
    þ Synchronet þ Digital Distortion BBS - digitaldistortionbbs.com