Subj : system.compiled_when property
To : All
From : Nightfox
Date : Fri May 17 2013 08:29 pm
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