Change __DATE__ to TIMESTAMP_ISO in Version string.
(upstream r8175)
This commit is contained in:
Dave Gotwisner 2014-04-18 11:21:05 +02:00 committed by Michael Iedema
parent aeeedadbe9
commit 2c65275472
4 changed files with 14 additions and 7 deletions

View File

@ -120,10 +120,12 @@ void L3TimeZoneAndTime::parseV(const L3Frame& src, size_t& rp)
void L3TimeZoneAndTime::text(ostream& os) const
{
char timeStr[26];
//char timeStr[26];
const time_t seconds = mTime.sec();
ctime_r(&seconds,timeStr);
timeStr[24]='\0';
std::string timeStr;
Timeval::isoTime(seconds, timeStr, true);
//ctime_r(&seconds,timeStr);
//timeStr[24]='\0';
os << timeStr << " (local)";
}

View File

@ -20,4 +20,4 @@
#include "config.h"
#include <Globals.h>
const char *gVersionString = "release " VERSION " built " __DATE__ " rev" SVN_REV " ";
const char *gVersionString = "release " VERSION " built " TIMESTAMP_ISO " rev" SVN_REV " ";

View File

@ -18,6 +18,9 @@
# along with this program. If not, see <http://www.gnu.org/licenses/>.
#
CXXFLAGS := -DTIMESTAMP_ISO=`date +'"%Y-%m-%dT%H:%M:%S"'`
CFLAGS := -DTIMESTAMP_ISO=`date +'"%Y-%m-%dT%H:%M:%S"'`
COMMON_INCLUDEDIR = $(top_srcdir)/CommonLibs
GSM_INCLUDEDIR = $(top_srcdir)/GSM
SMS_INCLUDEDIR = $(top_srcdir)/SMS

View File

@ -483,10 +483,12 @@ void TLValidityPeriod::write(TLFrame& dest, size_t& wp) const
void TLValidityPeriod::text(ostream& os) const
{
char str[27];
//char str[27];
time_t seconds = mExpiration.sec();
ctime_r(&seconds,str);
str[24]='\0';
//ctime_r(&seconds,str);
//str[24]='\0';
std::string str;
Timeval::isoTime(seconds, str, true);
os << "expiration=(" << str << ")";
}