From 9db949eec327df4173fde3de934a87bedb0db13c Mon Sep 17 00:00:00 2001 From: Bryan O'Sullivan Date: Mon, 2 Jun 2008 21:14:31 +0000 Subject: svn merge -r88066:88786 svn+ssh://svn.lindenlab.com/svn/linden/branches/cmake-9-merge dataserver-is-deprecated for-fucks-sake-whats-with-these-commit-markers --- indra/test/llhttpdate_tut.cpp | 31 ++++++++++++++++--------------- 1 file changed, 16 insertions(+), 15 deletions(-) (limited to 'indra/test/llhttpdate_tut.cpp') diff --git a/indra/test/llhttpdate_tut.cpp b/indra/test/llhttpdate_tut.cpp index 1be98250d2..c630e9caf0 100644 --- a/indra/test/llhttpdate_tut.cpp +++ b/indra/test/llhttpdate_tut.cpp @@ -69,24 +69,25 @@ namespace tut time_t sometime; time(&sometime); some_date = LLDate((F64) sometime); - struct tm result; - char expected[255], *actual; + struct tm *result; + char expected[255]; + std::string actual; - gmtime_r((time_t *)&sometime, &result); + result = gmtime(&sometime); /* - std::cout << " seconds: "<< result.tm_sec - << ", minutes: " << result.tm_min - << ", hours: " << result.tm_hour - << ", day of the month: " << result.tm_mday - << ", month: " << result.tm_mon - << ", year: " << result.tm_year - << ", day of the week: " << result.tm_wday - << ", day in the year: " << result.tm_yday - << ", DST: " << result.tm_isdst << std::endl; + std::cout << " seconds: "<< result->tm_sec + << ", minutes: " << result->tm_min + << ", hours: " << result->tm_hour + << ", day of the month: " << result->tm_mday + << ", month: " << result->tm_mon + << ", year: " << result->tm_year + << ", day of the week: " << result->tm_wday + << ", day in the year: " << result->tm_yday + << ", DST: " << result->tm_isdst << std::endl; */ - strftime(expected, 255, "%A, %d %h %Y %H:%M:%S GMT", &result); - actual = (char *) some_date.asRFC1123().c_str(); + strftime(expected, 255, "%A, %d %b %Y %H:%M:%S GMT", result); + actual = some_date.asRFC1123(); // probably not a good idea to use strcmp but this is just a unit test - ensure("Current time in RFC 1123", (strcmp(expected, actual) == 0)); + ensure("Current time in RFC 1123", (strcmp(expected, actual.c_str()) == 0)); } } -- cgit v1.2.3