@@ -116,8 +116,8 @@ gnc_localtime (const time64 *secs)
116
116
auto time = static_cast <struct tm *>(calloc (1 , sizeof (struct tm )));
117
117
if (gnc_localtime_r (secs, time) == NULL )
118
118
{
119
- gnc_tm_free (time);
120
- return NULL ;
119
+ gnc_tm_free (time);
120
+ return NULL ;
121
121
}
122
122
return time;
123
123
}
@@ -127,12 +127,12 @@ gnc_localtime_r (const time64 *secs, struct tm* time)
127
127
{
128
128
try
129
129
{
130
- *time = static_cast <struct tm >(GncDateTime (*secs));
131
- return time;
130
+ *time = static_cast <struct tm >(GncDateTime (*secs));
131
+ return time;
132
132
}
133
133
catch (std::invalid_argument)
134
134
{
135
- return NULL ;
135
+ return NULL ;
136
136
}
137
137
}
138
138
@@ -199,14 +199,14 @@ gnc_gmtime (const time64 *secs)
199
199
{
200
200
try
201
201
{
202
- auto time = static_cast <struct tm *>(calloc (1 , sizeof (struct tm )));
203
- GncDateTime gncdt (*secs);
204
- *time = gncdt.utc_tm ();
205
- return time;
202
+ auto time = static_cast <struct tm *>(calloc (1 , sizeof (struct tm )));
203
+ GncDateTime gncdt (*secs);
204
+ *time = gncdt.utc_tm ();
205
+ return time;
206
206
}
207
207
catch (std::invalid_argument)
208
208
{
209
- return NULL ;
209
+ return NULL ;
210
210
}
211
211
212
212
}
@@ -216,13 +216,13 @@ gnc_mktime (struct tm* time)
216
216
{
217
217
try
218
218
{
219
- normalize_struct_tm (time);
220
- GncDateTime gncdt (*time);
221
- return static_cast <time64>(gncdt) - gncdt.offset ();
219
+ normalize_struct_tm (time);
220
+ GncDateTime gncdt (*time);
221
+ return static_cast <time64>(gncdt) - gncdt.offset ();
222
222
}
223
223
catch (std::invalid_argument)
224
224
{
225
- return 0 ;
225
+ return 0 ;
226
226
}
227
227
}
228
228
@@ -231,12 +231,12 @@ gnc_timegm (struct tm* time)
231
231
{
232
232
try
233
233
{
234
- normalize_struct_tm (time);
235
- return static_cast <time64>(GncDateTime (*time));
234
+ normalize_struct_tm (time);
235
+ return static_cast <time64>(GncDateTime (*time));
236
236
}
237
237
catch (std::invalid_argument)
238
238
{
239
- return 0 ;
239
+ return 0 ;
240
240
}
241
241
}
242
242
@@ -259,12 +259,11 @@ gnc_time (time64 *tbuf)
259
259
gdouble
260
260
gnc_difftime (const time64 secs1, const time64 secs2)
261
261
{
262
- return (double )secs1 - (double )secs2;
262
+ return (double )secs1 - (double )secs2;
263
263
}
264
264
265
265
/* ***************************************************************************/
266
266
267
-
268
267
const char *
269
268
gnc_date_dateformat_to_string (QofDateFormat format)
270
269
{
@@ -319,7 +318,6 @@ gnc_date_string_to_dateformat(const char* fmt_str, QofDateFormat *format)
319
318
return FALSE ;
320
319
}
321
320
322
-
323
321
const char *
324
322
gnc_date_monthformat_to_string (GNCDateMonthFormat format)
325
323
{
@@ -411,7 +409,6 @@ timespec_normalize(Timespec *t)
411
409
return ;
412
410
}
413
411
414
-
415
412
gboolean
416
413
timespec_equal (const Timespec *ta, const Timespec *tb)
417
414
{
@@ -738,14 +735,14 @@ floordiv(int a, int b)
738
735
739
736
Fully formatted UTC timestamp strings are converted separately.
740
737
741
- param buff - pointer to date string
742
- param day - will store day of the month as 1 ... 31
743
- param month - will store month of the year as 1 ... 12
744
- param year - will store the year (4-digit)
738
+ param buff - pointer to date string
739
+ param day - will store day of the month as 1 ... 31
740
+ param month - will store month of the year as 1 ... 12
741
+ param year - will store the year (4-digit)
745
742
746
- return TRUE if date appeared to be valid.
743
+ return TRUE if date appeared to be valid.
747
744
748
- Globals: global dateFormat value
745
+ Globals: global dateFormat value
749
746
*/
750
747
static gboolean
751
748
qof_scan_date_internal (const char *buff, int *day, int *month, int *year,
@@ -1045,7 +1042,6 @@ char dateSeparator (void)
1045
1042
}
1046
1043
break ;
1047
1044
}
1048
-
1049
1045
return ' \0 ' ;
1050
1046
}
1051
1047
@@ -1179,7 +1175,6 @@ qof_strftime(gchar *buf, gsize max, const gchar *format, const struct tm *tm)
1179
1175
return retval;
1180
1176
}
1181
1177
1182
-
1183
1178
/* *******************************************************************\
1184
1179
\********************************************************************/
1185
1180
@@ -1248,7 +1243,6 @@ gnc_timespec_to_iso8601_buff (Timespec ts, char * buff)
1248
1243
PWARN (" Error processing time64 %" PRId64 " : %s" , ts.tv_sec , err.what ());
1249
1244
return buff;
1250
1245
}
1251
-
1252
1246
}
1253
1247
1254
1248
void
@@ -1287,7 +1281,6 @@ gnc_dmy2timespec_internal (int day, int month, int year, DayPart day_part)
1287
1281
}
1288
1282
}
1289
1283
1290
-
1291
1284
Timespec
1292
1285
gnc_dmy2timespec (int day, int month, int year)
1293
1286
{
@@ -1371,11 +1364,8 @@ gnc_gdate_set_time64 (GDate* gd, time64 time)
1371
1364
g_date_set_dmy (gd, tm.tm_mday ,
1372
1365
static_cast <GDateMonth>(tm.tm_mon + 1 ),
1373
1366
tm.tm_year + 1900 );
1374
-
1375
1367
}
1376
1368
1377
-
1378
-
1379
1369
Timespec gdate_to_timespec (GDate d)
1380
1370
{
1381
1371
return gnc_dmy2timespec_neutral (g_date_get_day (&d),
@@ -1423,7 +1413,6 @@ gnc_time64_get_day_end (time64 time_val)
1423
1413
return new_time;
1424
1414
}
1425
1415
1426
-
1427
1416
/* ======================================================== */
1428
1417
1429
1418
void
@@ -1500,7 +1489,6 @@ timespec_get_type( void )
1500
1489
timespec_boxed_copy_func,
1501
1490
timespec_boxed_free_func );
1502
1491
}
1503
-
1504
1492
return type;
1505
1493
}
1506
1494
0 commit comments