-
system.compiled_when property
From
Nightfox@VERT/DIGDIST to
Digital Man on Thu May 16 19: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 11: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 Fri May 17 19: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?�� ar> Apparently, yes. I'm on European time and region, and I get the following� ar> with system.compiled_when, as your subject:�� ar> C:\sbbs\mods\testing\compiled_when.js compiled in 0.00 seconds� ar> 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 Fri May 17 20:29:24 2013
Re: system.compiled_when property� By: Nightfox to Digital Man on Thu May 16 2013 19:16:06�� Ni> I saw that the bbs.compiled_when property is a string that contains the� Ni> date when Synchronet was compiled. I noticed that it's in the following� Ni> format: May 12 2013 05:02� Ni> Is it always in that format with month names in English, regardless of the� Ni> 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 12: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 12: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 Mon May 20 19:57:05 2013
Re: system.compiled_when property� By: Digital Man to Nightfox on Mon May 20 2013 12:41:28�� DM> Now, this is the date/time the executable was built, it does not tell you� DM> that it's "v3.16a" for example. You could build v3.15b today and the� DM> compiled_when property would contain today's date, but the version of the� DM> 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 Mon May 20 19:57:39 2013
Re: system.compiled_when property� By: Digital Man to Nightfox on Mon May 20 2013 12:43:32�� DM> Rather than basing your decision to use bbs.msg_number on the build date,� DM> why not check to see if it's non-zero? A zero message number is never� DM> valid. Just fall back to the previous behavior if the message number is� DM> 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 Mon May 20 20:51:27 2013
Re: system.compiled_when property� By: Nightfox to Digital Man on Mon May 20 2013 19:57:39�� Ni> Ah, I suppose I could do that. I didn't know 0 would be an invalid� Ni> 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 Mon May 20 22:01:24 2013
Re: system.compiled_when property� By: Digital Man to Nightfox on Mon May 20 2013 12:43:32�� DM> Rather than basing your decision to use bbs.msg_number on the build date,� DM> why not check to see if it's non-zero? A zero message number is never� DM> valid. Just fall back to the previous behavior if the message number is� DM> 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 12: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� >� > Ni> Ah, I suppose I could do that. I didn't know 0 would be an invalid� > Ni> 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 Thu May 23 20: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.�� DM> 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�