[open-ils-commits] r9125 - trunk/Open-ILS/src/c-apps
svn at svn.open-ils.org
svn at svn.open-ils.org
Mon Mar 24 14:59:55 EDT 2008
Author: miker
Date: 2008-03-24 14:24:52 -0400 (Mon, 24 Mar 2008)
New Revision: 9125
Modified:
trunk/Open-ILS/src/c-apps/oils_cstore.c
Log:
use gmtime for time-only calc
Modified: trunk/Open-ILS/src/c-apps/oils_cstore.c
===================================================================
--- trunk/Open-ILS/src/c-apps/oils_cstore.c 2008-03-24 17:59:52 UTC (rev 9124)
+++ trunk/Open-ILS/src/c-apps/oils_cstore.c 2008-03-24 18:24:52 UTC (rev 9125)
@@ -3202,13 +3202,15 @@
_tmp_dt = dbi_result_get_datetime(result, columnName);
- localtime_r( &_tmp_dt, &gmdt );
if (!(attr & DBI_DATETIME_DATE)) {
- strftime(dt_string, sizeof(dt_string), "%T%z", &gmdt);
+ gmtime_r( &_tmp_dt, &gmdt );
+ strftime(dt_string, sizeof(dt_string), "%T", &gmdt);
} else if (!(attr & DBI_DATETIME_TIME)) {
+ localtime_r( &_tmp_dt, &gmdt );
strftime(dt_string, sizeof(dt_string), "%F", &gmdt);
} else {
+ localtime_r( &_tmp_dt, &gmdt );
strftime(dt_string, sizeof(dt_string), "%FT%T%z", &gmdt);
}
@@ -3281,13 +3283,15 @@
_tmp_dt = dbi_result_get_datetime(result, columnName);
- localtime_r( &_tmp_dt, &gmdt );
if (!(attr & DBI_DATETIME_DATE)) {
- strftime(dt_string, sizeof(dt_string), "%T%z", &gmdt);
+ gmtime_r( &_tmp_dt, &gmdt );
+ strftime(dt_string, sizeof(dt_string), "%T", &gmdt);
} else if (!(attr & DBI_DATETIME_TIME)) {
+ localtime_r( &_tmp_dt, &gmdt );
strftime(dt_string, sizeof(dt_string), "%F", &gmdt);
} else {
+ localtime_r( &_tmp_dt, &gmdt );
strftime(dt_string, sizeof(dt_string), "%FT%T%z", &gmdt);
}
More information about the open-ils-commits
mailing list