Fossil SCM
Record fractional seconds for artifact times.
Commit
722d7cac97d5a67c225e97fa0c722d926044a528
Parent
be3d2154da66a4c…
9 files changed
+2
-4
-1
+7
-6
+1
-2
+1
-2
-1
+2
-4
+3
-6
+3
-2
+2
-4
| --- src/attach.c | ||
| +++ src/attach.c | ||
| @@ -257,12 +257,11 @@ | ||
| 257 | 257 | n = strlen(zComment); |
| 258 | 258 | while( n>0 && fossil_isspace(zComment[n-1]) ){ n--; } |
| 259 | 259 | if( n>0 ){ |
| 260 | 260 | blob_appendf(&manifest, "C %F\n", zComment); |
| 261 | 261 | } |
| 262 | - zDate = db_text(0, "SELECT datetime('now')"); | |
| 263 | - zDate[10] = 'T'; | |
| 262 | + zDate = date_in_standard_format("now"); | |
| 264 | 263 | blob_appendf(&manifest, "D %s\n", zDate); |
| 265 | 264 | blob_appendf(&manifest, "U %F\n", g.zLogin ? g.zLogin : "nobody"); |
| 266 | 265 | md5sum_blob(&manifest, &cksum); |
| 267 | 266 | blob_appendf(&manifest, "Z %b\n", &cksum); |
| 268 | 267 | rid = content_put(&manifest, 0, 0, 0); |
| @@ -337,12 +336,11 @@ | ||
| 337 | 336 | if( zFile[i]=='/' || zFile[i]=='\\' ) n = i; |
| 338 | 337 | } |
| 339 | 338 | zFile += n; |
| 340 | 339 | if( zFile[0]==0 ) zFile = "unknown"; |
| 341 | 340 | blob_appendf(&manifest, "A %F %F\n", zFile, zTarget); |
| 342 | - zDate = db_text(0, "SELECT datetime('now')"); | |
| 343 | - zDate[10] = 'T'; | |
| 341 | + zDate = date_in_standard_format("now"); | |
| 344 | 342 | blob_appendf(&manifest, "D %s\n", zDate); |
| 345 | 343 | blob_appendf(&manifest, "U %F\n", g.zLogin ? g.zLogin : "nobody"); |
| 346 | 344 | md5sum_blob(&manifest, &cksum); |
| 347 | 345 | blob_appendf(&manifest, "Z %b\n", &cksum); |
| 348 | 346 | rid = content_put(&manifest, 0, 0, 0); |
| 349 | 347 |
| --- src/attach.c | |
| +++ src/attach.c | |
| @@ -257,12 +257,11 @@ | |
| 257 | n = strlen(zComment); |
| 258 | while( n>0 && fossil_isspace(zComment[n-1]) ){ n--; } |
| 259 | if( n>0 ){ |
| 260 | blob_appendf(&manifest, "C %F\n", zComment); |
| 261 | } |
| 262 | zDate = db_text(0, "SELECT datetime('now')"); |
| 263 | zDate[10] = 'T'; |
| 264 | blob_appendf(&manifest, "D %s\n", zDate); |
| 265 | blob_appendf(&manifest, "U %F\n", g.zLogin ? g.zLogin : "nobody"); |
| 266 | md5sum_blob(&manifest, &cksum); |
| 267 | blob_appendf(&manifest, "Z %b\n", &cksum); |
| 268 | rid = content_put(&manifest, 0, 0, 0); |
| @@ -337,12 +336,11 @@ | |
| 337 | if( zFile[i]=='/' || zFile[i]=='\\' ) n = i; |
| 338 | } |
| 339 | zFile += n; |
| 340 | if( zFile[0]==0 ) zFile = "unknown"; |
| 341 | blob_appendf(&manifest, "A %F %F\n", zFile, zTarget); |
| 342 | zDate = db_text(0, "SELECT datetime('now')"); |
| 343 | zDate[10] = 'T'; |
| 344 | blob_appendf(&manifest, "D %s\n", zDate); |
| 345 | blob_appendf(&manifest, "U %F\n", g.zLogin ? g.zLogin : "nobody"); |
| 346 | md5sum_blob(&manifest, &cksum); |
| 347 | blob_appendf(&manifest, "Z %b\n", &cksum); |
| 348 | rid = content_put(&manifest, 0, 0, 0); |
| 349 |
| --- src/attach.c | |
| +++ src/attach.c | |
| @@ -257,12 +257,11 @@ | |
| 257 | n = strlen(zComment); |
| 258 | while( n>0 && fossil_isspace(zComment[n-1]) ){ n--; } |
| 259 | if( n>0 ){ |
| 260 | blob_appendf(&manifest, "C %F\n", zComment); |
| 261 | } |
| 262 | zDate = date_in_standard_format("now"); |
| 263 | blob_appendf(&manifest, "D %s\n", zDate); |
| 264 | blob_appendf(&manifest, "U %F\n", g.zLogin ? g.zLogin : "nobody"); |
| 265 | md5sum_blob(&manifest, &cksum); |
| 266 | blob_appendf(&manifest, "Z %b\n", &cksum); |
| 267 | rid = content_put(&manifest, 0, 0, 0); |
| @@ -337,12 +336,11 @@ | |
| 336 | if( zFile[i]=='/' || zFile[i]=='\\' ) n = i; |
| 337 | } |
| 338 | zFile += n; |
| 339 | if( zFile[0]==0 ) zFile = "unknown"; |
| 340 | blob_appendf(&manifest, "A %F %F\n", zFile, zTarget); |
| 341 | zDate = date_in_standard_format("now"); |
| 342 | blob_appendf(&manifest, "D %s\n", zDate); |
| 343 | blob_appendf(&manifest, "U %F\n", g.zLogin ? g.zLogin : "nobody"); |
| 344 | md5sum_blob(&manifest, &cksum); |
| 345 | blob_appendf(&manifest, "Z %b\n", &cksum); |
| 346 | rid = content_put(&manifest, 0, 0, 0); |
| 347 |
-1
| --- src/branch.c | ||
| +++ src/branch.c | ||
| @@ -84,11 +84,10 @@ | ||
| 84 | 84 | blob_appendf(&branch, "B %s\n", pParent->zBaseline); |
| 85 | 85 | } |
| 86 | 86 | zComment = mprintf("Create new branch named \"%h\"", zBranch); |
| 87 | 87 | blob_appendf(&branch, "C %F\n", zComment); |
| 88 | 88 | zDate = date_in_standard_format(zDateOvrd ? zDateOvrd : "now"); |
| 89 | - zDate[10] = 'T'; | |
| 90 | 89 | blob_appendf(&branch, "D %s\n", zDate); |
| 91 | 90 | |
| 92 | 91 | /* Copy all of the content from the parent into the branch */ |
| 93 | 92 | for(i=0; i<pParent->nFile; ++i){ |
| 94 | 93 | blob_appendf(&branch, "F %F", pParent->aFile[i].zName); |
| 95 | 94 |
| --- src/branch.c | |
| +++ src/branch.c | |
| @@ -84,11 +84,10 @@ | |
| 84 | blob_appendf(&branch, "B %s\n", pParent->zBaseline); |
| 85 | } |
| 86 | zComment = mprintf("Create new branch named \"%h\"", zBranch); |
| 87 | blob_appendf(&branch, "C %F\n", zComment); |
| 88 | zDate = date_in_standard_format(zDateOvrd ? zDateOvrd : "now"); |
| 89 | zDate[10] = 'T'; |
| 90 | blob_appendf(&branch, "D %s\n", zDate); |
| 91 | |
| 92 | /* Copy all of the content from the parent into the branch */ |
| 93 | for(i=0; i<pParent->nFile; ++i){ |
| 94 | blob_appendf(&branch, "F %F", pParent->aFile[i].zName); |
| 95 |
| --- src/branch.c | |
| +++ src/branch.c | |
| @@ -84,11 +84,10 @@ | |
| 84 | blob_appendf(&branch, "B %s\n", pParent->zBaseline); |
| 85 | } |
| 86 | zComment = mprintf("Create new branch named \"%h\"", zBranch); |
| 87 | blob_appendf(&branch, "C %F\n", zComment); |
| 88 | zDate = date_in_standard_format(zDateOvrd ? zDateOvrd : "now"); |
| 89 | blob_appendf(&branch, "D %s\n", zDate); |
| 90 | |
| 91 | /* Copy all of the content from the parent into the branch */ |
| 92 | for(i=0; i<pParent->nFile; ++i){ |
| 93 | blob_appendf(&branch, "F %F", pParent->aFile[i].zName); |
| 94 |
+7
-6
| --- src/checkin.c | ||
| +++ src/checkin.c | ||
| @@ -562,18 +562,19 @@ | ||
| 562 | 562 | ** zDate should be a valid date string. Convert this string into the |
| 563 | 563 | ** format YYYY-MM-DDTHH:MM:SS. If the string is not a valid date, |
| 564 | 564 | ** print a fatal error and quit. |
| 565 | 565 | */ |
| 566 | 566 | char *date_in_standard_format(const char *zInputDate){ |
| 567 | - char *zDate = db_text(0, "SELECT datetime(%Q)", zInputDate); | |
| 567 | + char *zDate; | |
| 568 | + zDate = db_text(0, "SELECT strftime('%%Y-%%m-%%dT%%H:%%M:%%f',%Q)", | |
| 569 | + zInputDate); | |
| 568 | 570 | if( zDate[0]==0 ){ |
| 569 | - fossil_fatal("unrecognized date format (%s): use \"YYYY-MM-DD HH:MM:SS\"", | |
| 570 | - zInputDate); | |
| 571 | + fossil_fatal( | |
| 572 | + "unrecognized date format (%s): use \"YYYY-MM-DD HH:MM:SS.SSS\"", | |
| 573 | + zInputDate | |
| 574 | + ); | |
| 571 | 575 | } |
| 572 | - assert( strlen(zDate)==19 ); | |
| 573 | - assert( zDate[10]==' ' ); | |
| 574 | - zDate[10] = 'T'; | |
| 575 | 576 | return zDate; |
| 576 | 577 | } |
| 577 | 578 | |
| 578 | 579 | /* |
| 579 | 580 | ** Create a manifest. |
| 580 | 581 |
| --- src/checkin.c | |
| +++ src/checkin.c | |
| @@ -562,18 +562,19 @@ | |
| 562 | ** zDate should be a valid date string. Convert this string into the |
| 563 | ** format YYYY-MM-DDTHH:MM:SS. If the string is not a valid date, |
| 564 | ** print a fatal error and quit. |
| 565 | */ |
| 566 | char *date_in_standard_format(const char *zInputDate){ |
| 567 | char *zDate = db_text(0, "SELECT datetime(%Q)", zInputDate); |
| 568 | if( zDate[0]==0 ){ |
| 569 | fossil_fatal("unrecognized date format (%s): use \"YYYY-MM-DD HH:MM:SS\"", |
| 570 | zInputDate); |
| 571 | } |
| 572 | assert( strlen(zDate)==19 ); |
| 573 | assert( zDate[10]==' ' ); |
| 574 | zDate[10] = 'T'; |
| 575 | return zDate; |
| 576 | } |
| 577 | |
| 578 | /* |
| 579 | ** Create a manifest. |
| 580 |
| --- src/checkin.c | |
| +++ src/checkin.c | |
| @@ -562,18 +562,19 @@ | |
| 562 | ** zDate should be a valid date string. Convert this string into the |
| 563 | ** format YYYY-MM-DDTHH:MM:SS. If the string is not a valid date, |
| 564 | ** print a fatal error and quit. |
| 565 | */ |
| 566 | char *date_in_standard_format(const char *zInputDate){ |
| 567 | char *zDate; |
| 568 | zDate = db_text(0, "SELECT strftime('%%Y-%%m-%%dT%%H:%%M:%%f',%Q)", |
| 569 | zInputDate); |
| 570 | if( zDate[0]==0 ){ |
| 571 | fossil_fatal( |
| 572 | "unrecognized date format (%s): use \"YYYY-MM-DD HH:MM:SS.SSS\"", |
| 573 | zInputDate |
| 574 | ); |
| 575 | } |
| 576 | return zDate; |
| 577 | } |
| 578 | |
| 579 | /* |
| 580 | ** Create a manifest. |
| 581 |
+1
-2
| --- src/event.c | ||
| +++ src/event.c | ||
| @@ -284,12 +284,11 @@ | ||
| 284 | 284 | int nrid; |
| 285 | 285 | blob_zero(&event); |
| 286 | 286 | db_begin_transaction(); |
| 287 | 287 | login_verify_csrf_secret(); |
| 288 | 288 | blob_appendf(&event, "C %F\n", zComment); |
| 289 | - zDate = db_text(0, "SELECT datetime('now')"); | |
| 290 | - zDate[10] = 'T'; | |
| 289 | + zDate = date_in_standard_format("now"); | |
| 291 | 290 | blob_appendf(&event, "D %s\n", zDate); |
| 292 | 291 | free(zDate); |
| 293 | 292 | zETime[10] = 'T'; |
| 294 | 293 | blob_appendf(&event, "E %s %s\n", zETime, zEventId); |
| 295 | 294 | zETime[10] = ' '; |
| 296 | 295 |
| --- src/event.c | |
| +++ src/event.c | |
| @@ -284,12 +284,11 @@ | |
| 284 | int nrid; |
| 285 | blob_zero(&event); |
| 286 | db_begin_transaction(); |
| 287 | login_verify_csrf_secret(); |
| 288 | blob_appendf(&event, "C %F\n", zComment); |
| 289 | zDate = db_text(0, "SELECT datetime('now')"); |
| 290 | zDate[10] = 'T'; |
| 291 | blob_appendf(&event, "D %s\n", zDate); |
| 292 | free(zDate); |
| 293 | zETime[10] = 'T'; |
| 294 | blob_appendf(&event, "E %s %s\n", zETime, zEventId); |
| 295 | zETime[10] = ' '; |
| 296 |
| --- src/event.c | |
| +++ src/event.c | |
| @@ -284,12 +284,11 @@ | |
| 284 | int nrid; |
| 285 | blob_zero(&event); |
| 286 | db_begin_transaction(); |
| 287 | login_verify_csrf_secret(); |
| 288 | blob_appendf(&event, "C %F\n", zComment); |
| 289 | zDate = date_in_standard_format("now"); |
| 290 | blob_appendf(&event, "D %s\n", zDate); |
| 291 | free(zDate); |
| 292 | zETime[10] = 'T'; |
| 293 | blob_appendf(&event, "E %s %s\n", zETime, zEventId); |
| 294 | zETime[10] = ' '; |
| 295 |
+1
-2
| --- src/info.c | ||
| +++ src/info.c | ||
| @@ -1466,12 +1466,11 @@ | ||
| 1466 | 1466 | char *zNow; |
| 1467 | 1467 | int nChng = 0; |
| 1468 | 1468 | |
| 1469 | 1469 | login_verify_csrf_secret(); |
| 1470 | 1470 | blob_zero(&ctrl); |
| 1471 | - zNow = db_text(0, "SELECT datetime('now')"); | |
| 1472 | - zNow[10] = 'T'; | |
| 1471 | + zNow = date_in_standard_format("now"); | |
| 1473 | 1472 | blob_appendf(&ctrl, "D %s\n", zNow); |
| 1474 | 1473 | db_multi_exec("CREATE TEMP TABLE newtags(tag UNIQUE, prefix, value)"); |
| 1475 | 1474 | if( zNewColor[0] |
| 1476 | 1475 | && (fPropagateColor!=fNewPropagateColor || strcmp(zColor,zNewColor)!=0) |
| 1477 | 1476 | ){ |
| 1478 | 1477 |
| --- src/info.c | |
| +++ src/info.c | |
| @@ -1466,12 +1466,11 @@ | |
| 1466 | char *zNow; |
| 1467 | int nChng = 0; |
| 1468 | |
| 1469 | login_verify_csrf_secret(); |
| 1470 | blob_zero(&ctrl); |
| 1471 | zNow = db_text(0, "SELECT datetime('now')"); |
| 1472 | zNow[10] = 'T'; |
| 1473 | blob_appendf(&ctrl, "D %s\n", zNow); |
| 1474 | db_multi_exec("CREATE TEMP TABLE newtags(tag UNIQUE, prefix, value)"); |
| 1475 | if( zNewColor[0] |
| 1476 | && (fPropagateColor!=fNewPropagateColor || strcmp(zColor,zNewColor)!=0) |
| 1477 | ){ |
| 1478 |
| --- src/info.c | |
| +++ src/info.c | |
| @@ -1466,12 +1466,11 @@ | |
| 1466 | char *zNow; |
| 1467 | int nChng = 0; |
| 1468 | |
| 1469 | login_verify_csrf_secret(); |
| 1470 | blob_zero(&ctrl); |
| 1471 | zNow = date_in_standard_format("now"); |
| 1472 | blob_appendf(&ctrl, "D %s\n", zNow); |
| 1473 | db_multi_exec("CREATE TEMP TABLE newtags(tag UNIQUE, prefix, value)"); |
| 1474 | if( zNewColor[0] |
| 1475 | && (fPropagateColor!=fNewPropagateColor || strcmp(zColor,zNewColor)!=0) |
| 1476 | ){ |
| 1477 |
-1
| --- src/tag.c | ||
| +++ src/tag.c | ||
| @@ -294,11 +294,10 @@ | ||
| 294 | 294 | zTagname |
| 295 | 295 | ); |
| 296 | 296 | } |
| 297 | 297 | #endif |
| 298 | 298 | zDate = date_in_standard_format(zDateOvrd ? zDateOvrd : "now"); |
| 299 | - zDate[10] = 'T'; | |
| 300 | 299 | blob_appendf(&ctrl, "D %s\n", zDate); |
| 301 | 300 | blob_appendf(&ctrl, "T %c%s%F %b", |
| 302 | 301 | zTagtype[tagtype], zPrefix, zTagname, &uuid); |
| 303 | 302 | if( tagtype>0 && zValue && zValue[0] ){ |
| 304 | 303 | blob_appendf(&ctrl, " %F\n", zValue); |
| 305 | 304 |
| --- src/tag.c | |
| +++ src/tag.c | |
| @@ -294,11 +294,10 @@ | |
| 294 | zTagname |
| 295 | ); |
| 296 | } |
| 297 | #endif |
| 298 | zDate = date_in_standard_format(zDateOvrd ? zDateOvrd : "now"); |
| 299 | zDate[10] = 'T'; |
| 300 | blob_appendf(&ctrl, "D %s\n", zDate); |
| 301 | blob_appendf(&ctrl, "T %c%s%F %b", |
| 302 | zTagtype[tagtype], zPrefix, zTagname, &uuid); |
| 303 | if( tagtype>0 && zValue && zValue[0] ){ |
| 304 | blob_appendf(&ctrl, " %F\n", zValue); |
| 305 |
| --- src/tag.c | |
| +++ src/tag.c | |
| @@ -294,11 +294,10 @@ | |
| 294 | zTagname |
| 295 | ); |
| 296 | } |
| 297 | #endif |
| 298 | zDate = date_in_standard_format(zDateOvrd ? zDateOvrd : "now"); |
| 299 | blob_appendf(&ctrl, "D %s\n", zDate); |
| 300 | blob_appendf(&ctrl, "T %c%s%F %b", |
| 301 | zTagtype[tagtype], zPrefix, zTagname, &uuid); |
| 302 | if( tagtype>0 && zValue && zValue[0] ){ |
| 303 | blob_appendf(&ctrl, " %F\n", zValue); |
| 304 |
+2
-4
| --- src/tkt.c | ||
| +++ src/tkt.c | ||
| @@ -429,12 +429,11 @@ | ||
| 429 | 429 | Blob tktchng, cksum; |
| 430 | 430 | |
| 431 | 431 | login_verify_csrf_secret(); |
| 432 | 432 | zUuid = (const char *)pUuid; |
| 433 | 433 | blob_zero(&tktchng); |
| 434 | - zDate = db_text(0, "SELECT datetime('now')"); | |
| 435 | - zDate[10] = 'T'; | |
| 434 | + zDate = date_in_standard_format("now"); | |
| 436 | 435 | blob_appendf(&tktchng, "D %s\n", zDate); |
| 437 | 436 | free(zDate); |
| 438 | 437 | for(i=0; i<nField; i++){ |
| 439 | 438 | if( azAppend[i] ){ |
| 440 | 439 | blob_appendf(&tktchng, "J +%s %z\n", azField[i], |
| @@ -1029,12 +1028,11 @@ | ||
| 1029 | 1028 | /* now add the needed artifacts to the repository */ |
| 1030 | 1029 | blob_zero(&tktchng); |
| 1031 | 1030 | { /* add the time to the ticket manifest */ |
| 1032 | 1031 | char *zDate; |
| 1033 | 1032 | |
| 1034 | - zDate = db_text(0, "SELECT datetime('now')"); | |
| 1035 | - zDate[10] = 'T'; | |
| 1033 | + zDate = date_in_standard_format("now"); | |
| 1036 | 1034 | blob_appendf(&tktchng, "D %s\n", zDate); |
| 1037 | 1035 | free(zDate); |
| 1038 | 1036 | } |
| 1039 | 1037 | /* append defined elements */ |
| 1040 | 1038 | for(i=0; i<nField; i++){ |
| 1041 | 1039 |
| --- src/tkt.c | |
| +++ src/tkt.c | |
| @@ -429,12 +429,11 @@ | |
| 429 | Blob tktchng, cksum; |
| 430 | |
| 431 | login_verify_csrf_secret(); |
| 432 | zUuid = (const char *)pUuid; |
| 433 | blob_zero(&tktchng); |
| 434 | zDate = db_text(0, "SELECT datetime('now')"); |
| 435 | zDate[10] = 'T'; |
| 436 | blob_appendf(&tktchng, "D %s\n", zDate); |
| 437 | free(zDate); |
| 438 | for(i=0; i<nField; i++){ |
| 439 | if( azAppend[i] ){ |
| 440 | blob_appendf(&tktchng, "J +%s %z\n", azField[i], |
| @@ -1029,12 +1028,11 @@ | |
| 1029 | /* now add the needed artifacts to the repository */ |
| 1030 | blob_zero(&tktchng); |
| 1031 | { /* add the time to the ticket manifest */ |
| 1032 | char *zDate; |
| 1033 | |
| 1034 | zDate = db_text(0, "SELECT datetime('now')"); |
| 1035 | zDate[10] = 'T'; |
| 1036 | blob_appendf(&tktchng, "D %s\n", zDate); |
| 1037 | free(zDate); |
| 1038 | } |
| 1039 | /* append defined elements */ |
| 1040 | for(i=0; i<nField; i++){ |
| 1041 |
| --- src/tkt.c | |
| +++ src/tkt.c | |
| @@ -429,12 +429,11 @@ | |
| 429 | Blob tktchng, cksum; |
| 430 | |
| 431 | login_verify_csrf_secret(); |
| 432 | zUuid = (const char *)pUuid; |
| 433 | blob_zero(&tktchng); |
| 434 | zDate = date_in_standard_format("now"); |
| 435 | blob_appendf(&tktchng, "D %s\n", zDate); |
| 436 | free(zDate); |
| 437 | for(i=0; i<nField; i++){ |
| 438 | if( azAppend[i] ){ |
| 439 | blob_appendf(&tktchng, "J +%s %z\n", azField[i], |
| @@ -1029,12 +1028,11 @@ | |
| 1028 | /* now add the needed artifacts to the repository */ |
| 1029 | blob_zero(&tktchng); |
| 1030 | { /* add the time to the ticket manifest */ |
| 1031 | char *zDate; |
| 1032 | |
| 1033 | zDate = date_in_standard_format("now"); |
| 1034 | blob_appendf(&tktchng, "D %s\n", zDate); |
| 1035 | free(zDate); |
| 1036 | } |
| 1037 | /* append defined elements */ |
| 1038 | for(i=0; i<nField; i++){ |
| 1039 |
+3
-6
| --- src/wiki.c | ||
| +++ src/wiki.c | ||
| @@ -305,12 +305,11 @@ | ||
| 305 | 305 | db_begin_transaction(); |
| 306 | 306 | if( isSandbox ){ |
| 307 | 307 | db_set("sandbox",zBody,0); |
| 308 | 308 | }else{ |
| 309 | 309 | login_verify_csrf_secret(); |
| 310 | - zDate = db_text(0, "SELECT datetime('now')"); | |
| 311 | - zDate[10] = 'T'; | |
| 310 | + zDate = date_in_standard_format("now"); | |
| 312 | 311 | blob_appendf(&wiki, "D %s\n", zDate); |
| 313 | 312 | free(zDate); |
| 314 | 313 | blob_appendf(&wiki, "L %F\n", zPageName); |
| 315 | 314 | if( rid ){ |
| 316 | 315 | char *zUuid = db_text(0, "SELECT uuid FROM blob WHERE rid=%d", rid); |
| @@ -478,12 +477,11 @@ | ||
| 478 | 477 | blob_append(&body, pWiki->zWiki, -1); |
| 479 | 478 | manifest_destroy(pWiki); |
| 480 | 479 | } |
| 481 | 480 | blob_zero(&wiki); |
| 482 | 481 | db_begin_transaction(); |
| 483 | - zDate = db_text(0, "SELECT datetime('now')"); | |
| 484 | - zDate[10] = 'T'; | |
| 482 | + zDate = date_in_standard_format("now"); | |
| 485 | 483 | blob_appendf(&wiki, "D %s\n", zDate); |
| 486 | 484 | blob_appendf(&wiki, "L %F\n", zPageName); |
| 487 | 485 | if( rid ){ |
| 488 | 486 | char *zUuid = db_text(0, "SELECT uuid FROM blob WHERE rid=%d", rid); |
| 489 | 487 | blob_appendf(&wiki, "P %s\n", zUuid); |
| @@ -800,12 +798,11 @@ | ||
| 800 | 798 | if( rid!=0 && isNew ){ |
| 801 | 799 | fossil_fatal("wiki page %s already exists", zPageName); |
| 802 | 800 | } |
| 803 | 801 | |
| 804 | 802 | blob_zero(&wiki); |
| 805 | - zDate = db_text(0, "SELECT datetime('now')"); | |
| 806 | - zDate[10] = 'T'; | |
| 803 | + zDate = date_in_standard_format("now"); | |
| 807 | 804 | blob_appendf(&wiki, "D %s\n", zDate); |
| 808 | 805 | free(zDate); |
| 809 | 806 | blob_appendf(&wiki, "L %F\n", zPageName ); |
| 810 | 807 | if( rid ){ |
| 811 | 808 | zUuid = db_text(0, "SELECT uuid FROM blob WHERE rid=%d", rid); |
| 812 | 809 |
| --- src/wiki.c | |
| +++ src/wiki.c | |
| @@ -305,12 +305,11 @@ | |
| 305 | db_begin_transaction(); |
| 306 | if( isSandbox ){ |
| 307 | db_set("sandbox",zBody,0); |
| 308 | }else{ |
| 309 | login_verify_csrf_secret(); |
| 310 | zDate = db_text(0, "SELECT datetime('now')"); |
| 311 | zDate[10] = 'T'; |
| 312 | blob_appendf(&wiki, "D %s\n", zDate); |
| 313 | free(zDate); |
| 314 | blob_appendf(&wiki, "L %F\n", zPageName); |
| 315 | if( rid ){ |
| 316 | char *zUuid = db_text(0, "SELECT uuid FROM blob WHERE rid=%d", rid); |
| @@ -478,12 +477,11 @@ | |
| 478 | blob_append(&body, pWiki->zWiki, -1); |
| 479 | manifest_destroy(pWiki); |
| 480 | } |
| 481 | blob_zero(&wiki); |
| 482 | db_begin_transaction(); |
| 483 | zDate = db_text(0, "SELECT datetime('now')"); |
| 484 | zDate[10] = 'T'; |
| 485 | blob_appendf(&wiki, "D %s\n", zDate); |
| 486 | blob_appendf(&wiki, "L %F\n", zPageName); |
| 487 | if( rid ){ |
| 488 | char *zUuid = db_text(0, "SELECT uuid FROM blob WHERE rid=%d", rid); |
| 489 | blob_appendf(&wiki, "P %s\n", zUuid); |
| @@ -800,12 +798,11 @@ | |
| 800 | if( rid!=0 && isNew ){ |
| 801 | fossil_fatal("wiki page %s already exists", zPageName); |
| 802 | } |
| 803 | |
| 804 | blob_zero(&wiki); |
| 805 | zDate = db_text(0, "SELECT datetime('now')"); |
| 806 | zDate[10] = 'T'; |
| 807 | blob_appendf(&wiki, "D %s\n", zDate); |
| 808 | free(zDate); |
| 809 | blob_appendf(&wiki, "L %F\n", zPageName ); |
| 810 | if( rid ){ |
| 811 | zUuid = db_text(0, "SELECT uuid FROM blob WHERE rid=%d", rid); |
| 812 |
| --- src/wiki.c | |
| +++ src/wiki.c | |
| @@ -305,12 +305,11 @@ | |
| 305 | db_begin_transaction(); |
| 306 | if( isSandbox ){ |
| 307 | db_set("sandbox",zBody,0); |
| 308 | }else{ |
| 309 | login_verify_csrf_secret(); |
| 310 | zDate = date_in_standard_format("now"); |
| 311 | blob_appendf(&wiki, "D %s\n", zDate); |
| 312 | free(zDate); |
| 313 | blob_appendf(&wiki, "L %F\n", zPageName); |
| 314 | if( rid ){ |
| 315 | char *zUuid = db_text(0, "SELECT uuid FROM blob WHERE rid=%d", rid); |
| @@ -478,12 +477,11 @@ | |
| 477 | blob_append(&body, pWiki->zWiki, -1); |
| 478 | manifest_destroy(pWiki); |
| 479 | } |
| 480 | blob_zero(&wiki); |
| 481 | db_begin_transaction(); |
| 482 | zDate = date_in_standard_format("now"); |
| 483 | blob_appendf(&wiki, "D %s\n", zDate); |
| 484 | blob_appendf(&wiki, "L %F\n", zPageName); |
| 485 | if( rid ){ |
| 486 | char *zUuid = db_text(0, "SELECT uuid FROM blob WHERE rid=%d", rid); |
| 487 | blob_appendf(&wiki, "P %s\n", zUuid); |
| @@ -800,12 +798,11 @@ | |
| 798 | if( rid!=0 && isNew ){ |
| 799 | fossil_fatal("wiki page %s already exists", zPageName); |
| 800 | } |
| 801 | |
| 802 | blob_zero(&wiki); |
| 803 | zDate = date_in_standard_format("now"); |
| 804 | blob_appendf(&wiki, "D %s\n", zDate); |
| 805 | free(zDate); |
| 806 | blob_appendf(&wiki, "L %F\n", zPageName ); |
| 807 | if( rid ){ |
| 808 | zUuid = db_text(0, "SELECT uuid FROM blob WHERE rid=%d", rid); |
| 809 |
+3
-2
| --- www/fileformat.wiki | ||
| +++ www/fileformat.wiki | ||
| @@ -128,14 +128,15 @@ | ||
| 128 | 128 | in the comment. |
| 129 | 129 | |
| 130 | 130 | A manifest must have exactly one D-card. The sole argument to |
| 131 | 131 | the D-card is a date-time stamp in the ISO8601 format. The |
| 132 | 132 | date and time should be in coordinated universal time (UTC). |
| 133 | -The format is: | |
| 133 | +The format one of: | |
| 134 | 134 | |
| 135 | 135 | <blockquote> |
| 136 | -<i>YYYY</i><b>-</b><i>MM</i><b>-</b><i>DD</i><b>T</b><i>HH</i><b>:</b><i>MM</i><b>:</b><i>SS</i> | |
| 136 | +<i>YYYY</i><b>-</b><i>MM</i><b>-</b><i>DD</i><b>T</b><i>HH</i><b>:</b><i>MM</i><b>:</b><i>SS</i><br> | |
| 137 | +<i>YYYY</i><b>-</b><i>MM</i><b>-</b><i>DD</i><b>T</b><i>HH</i><b>:</b><i>MM</i><b>:</b><i>SS</i><b>.</b><i>SSS</i> | |
| 137 | 138 | </blockquote> |
| 138 | 139 | |
| 139 | 140 | A manifest has zero or more F-cards. Each F-card identifies a file |
| 140 | 141 | that is part of the check-in. There are one, two, three, or four arguments. |
| 141 | 142 | The first argument |
| 142 | 143 |
| --- www/fileformat.wiki | |
| +++ www/fileformat.wiki | |
| @@ -128,14 +128,15 @@ | |
| 128 | in the comment. |
| 129 | |
| 130 | A manifest must have exactly one D-card. The sole argument to |
| 131 | the D-card is a date-time stamp in the ISO8601 format. The |
| 132 | date and time should be in coordinated universal time (UTC). |
| 133 | The format is: |
| 134 | |
| 135 | <blockquote> |
| 136 | <i>YYYY</i><b>-</b><i>MM</i><b>-</b><i>DD</i><b>T</b><i>HH</i><b>:</b><i>MM</i><b>:</b><i>SS</i> |
| 137 | </blockquote> |
| 138 | |
| 139 | A manifest has zero or more F-cards. Each F-card identifies a file |
| 140 | that is part of the check-in. There are one, two, three, or four arguments. |
| 141 | The first argument |
| 142 |
| --- www/fileformat.wiki | |
| +++ www/fileformat.wiki | |
| @@ -128,14 +128,15 @@ | |
| 128 | in the comment. |
| 129 | |
| 130 | A manifest must have exactly one D-card. The sole argument to |
| 131 | the D-card is a date-time stamp in the ISO8601 format. The |
| 132 | date and time should be in coordinated universal time (UTC). |
| 133 | The format one of: |
| 134 | |
| 135 | <blockquote> |
| 136 | <i>YYYY</i><b>-</b><i>MM</i><b>-</b><i>DD</i><b>T</b><i>HH</i><b>:</b><i>MM</i><b>:</b><i>SS</i><br> |
| 137 | <i>YYYY</i><b>-</b><i>MM</i><b>-</b><i>DD</i><b>T</b><i>HH</i><b>:</b><i>MM</i><b>:</b><i>SS</i><b>.</b><i>SSS</i> |
| 138 | </blockquote> |
| 139 | |
| 140 | A manifest has zero or more F-cards. Each F-card identifies a file |
| 141 | that is part of the check-in. There are one, two, three, or four arguments. |
| 142 | The first argument |
| 143 |