Fossil SCM
Changed days-per-year from 365.24 to 365.2425, which is (per Wikipedia) more correct over longer time periods (patch from J. van den Hoff). Removed serverId from /json/stat output, analog to commit [6bb63a7364].
Commit
823d3ed6d38323d63568fe6f3116069aa53b0561
Parent
e5f9b18d3604880…
2 files changed
+1
-3
+2
-2
+1
-3
| --- src/json.c | ||
| +++ src/json.c | ||
| @@ -2085,15 +2085,13 @@ | ||
| 2085 | 2085 | cson_object_set(jo, "ticketCount", cson_value_new_integer((cson_int_t)n)); |
| 2086 | 2086 | }/*full*/ |
| 2087 | 2087 | n = db_int(0, "SELECT julianday('now') - (SELECT min(mtime) FROM event)" |
| 2088 | 2088 | " + 0.99"); |
| 2089 | 2089 | cson_object_set(jo, "ageDays", cson_value_new_integer((cson_int_t)n)); |
| 2090 | - cson_object_set(jo, "ageYears", cson_value_new_double(n/365.24)); | |
| 2090 | + cson_object_set(jo, "ageYears", cson_value_new_double(n/365.2425)); | |
| 2091 | 2091 | sqlite3_snprintf(BufLen, zBuf, db_get("project-code","")); |
| 2092 | 2092 | SETBUF(jo, "projectCode"); |
| 2093 | - sqlite3_snprintf(BufLen, zBuf, db_get("server-code","")); | |
| 2094 | - SETBUF(jo, "serverCode"); | |
| 2095 | 2093 | cson_object_set(jo, "compiler", cson_value_new_string(COMPILER_NAME, strlen(COMPILER_NAME))); |
| 2096 | 2094 | |
| 2097 | 2095 | jv2 = cson_value_new_object(); |
| 2098 | 2096 | jo2 = cson_value_get_object(jv2); |
| 2099 | 2097 | cson_object_set(jo, "sqlite", jv2); |
| 2100 | 2098 |
| --- src/json.c | |
| +++ src/json.c | |
| @@ -2085,15 +2085,13 @@ | |
| 2085 | cson_object_set(jo, "ticketCount", cson_value_new_integer((cson_int_t)n)); |
| 2086 | }/*full*/ |
| 2087 | n = db_int(0, "SELECT julianday('now') - (SELECT min(mtime) FROM event)" |
| 2088 | " + 0.99"); |
| 2089 | cson_object_set(jo, "ageDays", cson_value_new_integer((cson_int_t)n)); |
| 2090 | cson_object_set(jo, "ageYears", cson_value_new_double(n/365.24)); |
| 2091 | sqlite3_snprintf(BufLen, zBuf, db_get("project-code","")); |
| 2092 | SETBUF(jo, "projectCode"); |
| 2093 | sqlite3_snprintf(BufLen, zBuf, db_get("server-code","")); |
| 2094 | SETBUF(jo, "serverCode"); |
| 2095 | cson_object_set(jo, "compiler", cson_value_new_string(COMPILER_NAME, strlen(COMPILER_NAME))); |
| 2096 | |
| 2097 | jv2 = cson_value_new_object(); |
| 2098 | jo2 = cson_value_get_object(jv2); |
| 2099 | cson_object_set(jo, "sqlite", jv2); |
| 2100 |
| --- src/json.c | |
| +++ src/json.c | |
| @@ -2085,15 +2085,13 @@ | |
| 2085 | cson_object_set(jo, "ticketCount", cson_value_new_integer((cson_int_t)n)); |
| 2086 | }/*full*/ |
| 2087 | n = db_int(0, "SELECT julianday('now') - (SELECT min(mtime) FROM event)" |
| 2088 | " + 0.99"); |
| 2089 | cson_object_set(jo, "ageDays", cson_value_new_integer((cson_int_t)n)); |
| 2090 | cson_object_set(jo, "ageYears", cson_value_new_double(n/365.2425)); |
| 2091 | sqlite3_snprintf(BufLen, zBuf, db_get("project-code","")); |
| 2092 | SETBUF(jo, "projectCode"); |
| 2093 | cson_object_set(jo, "compiler", cson_value_new_string(COMPILER_NAME, strlen(COMPILER_NAME))); |
| 2094 | |
| 2095 | jv2 = cson_value_new_object(); |
| 2096 | jo2 = cson_value_get_object(jv2); |
| 2097 | cson_object_set(jo, "sqlite", jv2); |
| 2098 |
+2
-2
| --- src/stat.c | ||
| +++ src/stat.c | ||
| @@ -115,11 +115,11 @@ | ||
| 115 | 115 | @ </td></tr> |
| 116 | 116 | } |
| 117 | 117 | @ <tr><th>Duration Of Project:</th><td> |
| 118 | 118 | n = db_int(0, "SELECT julianday('now') - (SELECT min(mtime) FROM event)" |
| 119 | 119 | " + 0.99"); |
| 120 | - @ %d(n) days or approximately %.2f(n/365.24) years. | |
| 120 | + @ %d(n) days or approximately %.2f(n/365.2425) years. | |
| 121 | 121 | @ </td></tr> |
| 122 | 122 | @ <tr><th>Project ID:</th><td>%h(db_get("project-code",""))</td></tr> |
| 123 | 123 | @ <tr><th>Fossil Version:</th><td> |
| 124 | 124 | @ %h(MANIFEST_DATE) %h(MANIFEST_VERSION) |
| 125 | 125 | @ (%h(RELEASE_VERSION)) [compiled using %h(COMPILER_NAME)] |
| @@ -205,11 +205,11 @@ | ||
| 205 | 205 | fossil_print("%*s%d\n", colWidth, "tagchange-count:", n); |
| 206 | 206 | } |
| 207 | 207 | n = db_int(0, "SELECT julianday('now') - (SELECT min(mtime) FROM event)" |
| 208 | 208 | " + 0.99"); |
| 209 | 209 | fossil_print("%*s%d days or approximately %.2f years.\n", |
| 210 | - colWidth, "project-age:", n, n/365.24); | |
| 210 | + colWidth, "project-age:", n, n/365.2425); | |
| 211 | 211 | fossil_print("%*s%s\n", colWidth, "project-id:", db_get("project-code","")); |
| 212 | 212 | fossil_print("%*s%s\n", colWidth, "server-id:", db_get("server-code","")); |
| 213 | 213 | fossil_print("%*s%s %s %s (%s)\n", |
| 214 | 214 | colWidth, "fossil-version:", |
| 215 | 215 | RELEASE_VERSION, MANIFEST_DATE, MANIFEST_VERSION, |
| 216 | 216 |
| --- src/stat.c | |
| +++ src/stat.c | |
| @@ -115,11 +115,11 @@ | |
| 115 | @ </td></tr> |
| 116 | } |
| 117 | @ <tr><th>Duration Of Project:</th><td> |
| 118 | n = db_int(0, "SELECT julianday('now') - (SELECT min(mtime) FROM event)" |
| 119 | " + 0.99"); |
| 120 | @ %d(n) days or approximately %.2f(n/365.24) years. |
| 121 | @ </td></tr> |
| 122 | @ <tr><th>Project ID:</th><td>%h(db_get("project-code",""))</td></tr> |
| 123 | @ <tr><th>Fossil Version:</th><td> |
| 124 | @ %h(MANIFEST_DATE) %h(MANIFEST_VERSION) |
| 125 | @ (%h(RELEASE_VERSION)) [compiled using %h(COMPILER_NAME)] |
| @@ -205,11 +205,11 @@ | |
| 205 | fossil_print("%*s%d\n", colWidth, "tagchange-count:", n); |
| 206 | } |
| 207 | n = db_int(0, "SELECT julianday('now') - (SELECT min(mtime) FROM event)" |
| 208 | " + 0.99"); |
| 209 | fossil_print("%*s%d days or approximately %.2f years.\n", |
| 210 | colWidth, "project-age:", n, n/365.24); |
| 211 | fossil_print("%*s%s\n", colWidth, "project-id:", db_get("project-code","")); |
| 212 | fossil_print("%*s%s\n", colWidth, "server-id:", db_get("server-code","")); |
| 213 | fossil_print("%*s%s %s %s (%s)\n", |
| 214 | colWidth, "fossil-version:", |
| 215 | RELEASE_VERSION, MANIFEST_DATE, MANIFEST_VERSION, |
| 216 |
| --- src/stat.c | |
| +++ src/stat.c | |
| @@ -115,11 +115,11 @@ | |
| 115 | @ </td></tr> |
| 116 | } |
| 117 | @ <tr><th>Duration Of Project:</th><td> |
| 118 | n = db_int(0, "SELECT julianday('now') - (SELECT min(mtime) FROM event)" |
| 119 | " + 0.99"); |
| 120 | @ %d(n) days or approximately %.2f(n/365.2425) years. |
| 121 | @ </td></tr> |
| 122 | @ <tr><th>Project ID:</th><td>%h(db_get("project-code",""))</td></tr> |
| 123 | @ <tr><th>Fossil Version:</th><td> |
| 124 | @ %h(MANIFEST_DATE) %h(MANIFEST_VERSION) |
| 125 | @ (%h(RELEASE_VERSION)) [compiled using %h(COMPILER_NAME)] |
| @@ -205,11 +205,11 @@ | |
| 205 | fossil_print("%*s%d\n", colWidth, "tagchange-count:", n); |
| 206 | } |
| 207 | n = db_int(0, "SELECT julianday('now') - (SELECT min(mtime) FROM event)" |
| 208 | " + 0.99"); |
| 209 | fossil_print("%*s%d days or approximately %.2f years.\n", |
| 210 | colWidth, "project-age:", n, n/365.2425); |
| 211 | fossil_print("%*s%s\n", colWidth, "project-id:", db_get("project-code","")); |
| 212 | fossil_print("%*s%s\n", colWidth, "server-id:", db_get("server-code","")); |
| 213 | fossil_print("%*s%s %s %s (%s)\n", |
| 214 | colWidth, "fossil-version:", |
| 215 | RELEASE_VERSION, MANIFEST_DATE, MANIFEST_VERSION, |
| 216 |