Fossil SCM
fixed the mtime field on json timeline output.
Commit
df50cb6e4d5674ebf7d4139c3775378ba05acd4b
Parent
8ff34a4b6ca5e2d…
1 file changed
+4
-4
+4
-4
| --- src/json_timeline.c | ||
| +++ src/json_timeline.c | ||
| @@ -88,20 +88,21 @@ | ||
| 88 | 88 | db_multi_exec("%s", zSql /*safe-for-%s*/); |
| 89 | 89 | } |
| 90 | 90 | |
| 91 | 91 | /* |
| 92 | 92 | ** Return a pointer to a constant string that forms the basis |
| 93 | -** for a timeline query for the JSON interface. | |
| 93 | +** for a timeline query for the JSON interface. It MUST NOT | |
| 94 | +** be used in a formatted string argument. | |
| 94 | 95 | */ |
| 95 | 96 | char const * json_timeline_query(void){ |
| 96 | 97 | /* Field order MUST match that from json_timeline_temp_table()!!! */ |
| 97 | 98 | static const char zBaseSql[] = |
| 98 | 99 | @ SELECT |
| 99 | 100 | @ NULL, |
| 100 | 101 | @ blob.rid, |
| 101 | 102 | @ uuid, |
| 102 | - @ CAST(strftime('%%s',event.mtime) AS INTEGER), | |
| 103 | + @ CAST(strftime('%s',event.mtime) AS INTEGER), | |
| 103 | 104 | @ datetime(event.mtime), |
| 104 | 105 | @ coalesce(ecomment, comment), |
| 105 | 106 | @ coalesce(euser, user), |
| 106 | 107 | @ blob.rid IN leaf, |
| 107 | 108 | @ bgcolor, |
| @@ -544,12 +545,11 @@ | ||
| 544 | 545 | goto error; |
| 545 | 546 | } |
| 546 | 547 | |
| 547 | 548 | #if 0 |
| 548 | 549 | /* only for testing! */ |
| 549 | - tmp = cson_value_new_string(blob_buffer(&sql),strlen(blob_buffer(&sql))); | |
| 550 | - SET("timelineSql"); | |
| 550 | + cson_object_set(pay, "timelineSql", cson_value_new_string(blob_buffer(&sql),strlen(blob_buffer(&sql)))); | |
| 551 | 551 | #endif |
| 552 | 552 | db_multi_exec("%s", blob_buffer(&sql) /*safe-for-%s*/); |
| 553 | 553 | blob_reset(&sql); |
| 554 | 554 | db_prepare(&q, "SELECT" |
| 555 | 555 | " uuid AS uuid," |
| 556 | 556 |
| --- src/json_timeline.c | |
| +++ src/json_timeline.c | |
| @@ -88,20 +88,21 @@ | |
| 88 | db_multi_exec("%s", zSql /*safe-for-%s*/); |
| 89 | } |
| 90 | |
| 91 | /* |
| 92 | ** Return a pointer to a constant string that forms the basis |
| 93 | ** for a timeline query for the JSON interface. |
| 94 | */ |
| 95 | char const * json_timeline_query(void){ |
| 96 | /* Field order MUST match that from json_timeline_temp_table()!!! */ |
| 97 | static const char zBaseSql[] = |
| 98 | @ SELECT |
| 99 | @ NULL, |
| 100 | @ blob.rid, |
| 101 | @ uuid, |
| 102 | @ CAST(strftime('%%s',event.mtime) AS INTEGER), |
| 103 | @ datetime(event.mtime), |
| 104 | @ coalesce(ecomment, comment), |
| 105 | @ coalesce(euser, user), |
| 106 | @ blob.rid IN leaf, |
| 107 | @ bgcolor, |
| @@ -544,12 +545,11 @@ | |
| 544 | goto error; |
| 545 | } |
| 546 | |
| 547 | #if 0 |
| 548 | /* only for testing! */ |
| 549 | tmp = cson_value_new_string(blob_buffer(&sql),strlen(blob_buffer(&sql))); |
| 550 | SET("timelineSql"); |
| 551 | #endif |
| 552 | db_multi_exec("%s", blob_buffer(&sql) /*safe-for-%s*/); |
| 553 | blob_reset(&sql); |
| 554 | db_prepare(&q, "SELECT" |
| 555 | " uuid AS uuid," |
| 556 |
| --- src/json_timeline.c | |
| +++ src/json_timeline.c | |
| @@ -88,20 +88,21 @@ | |
| 88 | db_multi_exec("%s", zSql /*safe-for-%s*/); |
| 89 | } |
| 90 | |
| 91 | /* |
| 92 | ** Return a pointer to a constant string that forms the basis |
| 93 | ** for a timeline query for the JSON interface. It MUST NOT |
| 94 | ** be used in a formatted string argument. |
| 95 | */ |
| 96 | char const * json_timeline_query(void){ |
| 97 | /* Field order MUST match that from json_timeline_temp_table()!!! */ |
| 98 | static const char zBaseSql[] = |
| 99 | @ SELECT |
| 100 | @ NULL, |
| 101 | @ blob.rid, |
| 102 | @ uuid, |
| 103 | @ CAST(strftime('%s',event.mtime) AS INTEGER), |
| 104 | @ datetime(event.mtime), |
| 105 | @ coalesce(ecomment, comment), |
| 106 | @ coalesce(euser, user), |
| 107 | @ blob.rid IN leaf, |
| 108 | @ bgcolor, |
| @@ -544,12 +545,11 @@ | |
| 545 | goto error; |
| 546 | } |
| 547 | |
| 548 | #if 0 |
| 549 | /* only for testing! */ |
| 550 | cson_object_set(pay, "timelineSql", cson_value_new_string(blob_buffer(&sql),strlen(blob_buffer(&sql)))); |
| 551 | #endif |
| 552 | db_multi_exec("%s", blob_buffer(&sql) /*safe-for-%s*/); |
| 553 | blob_reset(&sql); |
| 554 | db_prepare(&q, "SELECT" |
| 555 | " uuid AS uuid," |
| 556 |