-
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ã