Fossil SCM

Fix /tree page and "timeline-utc" setting in combination with --disable-internal-sqlite configuration

jan.nijtmans 2014-01-02 16:50 trunk merge
Commit bd1151126a1b615a64d63f86243bb510a26504f1
+5 -5
--- src/attach.c
+++ src/attach.c
@@ -40,16 +40,16 @@
4040
Stmt q;
4141
4242
if( zPage && zTkt ) zTkt = 0;
4343
login_check_credentials();
4444
blob_zero(&sql);
45
- blob_append(&sql,
46
- "SELECT datetime(mtime,'localtime'), src, target, filename,"
45
+ blob_appendf(&sql,
46
+ "SELECT datetime(mtime%s), src, target, filename,"
4747
" comment, user,"
4848
" (SELECT uuid FROM blob WHERE rid=attachid), attachid"
4949
" FROM attachment",
50
- -1
50
+ timeline_utc()
5151
);
5252
if( zPage ){
5353
if( g.perm.RdWiki==0 ) login_needed();
5454
style_header("Attachments To %h", zPage);
5555
blob_appendf(&sql, " WHERE target=%Q", zPage);
@@ -553,16 +553,16 @@
553553
const char *zHeader /* Header to display with attachments */
554554
){
555555
int cnt = 0;
556556
Stmt q;
557557
db_prepare(&q,
558
- "SELECT datetime(mtime,'localtime'), filename, user,"
558
+ "SELECT datetime(mtime%s), filename, user,"
559559
" (SELECT uuid FROM blob WHERE rid=attachid), src"
560560
" FROM attachment"
561561
" WHERE isLatest AND src!='' AND target=%Q"
562562
" ORDER BY mtime DESC",
563
- zTarget
563
+ timeline_utc(), zTarget
564564
);
565565
while( db_step(&q)==SQLITE_ROW ){
566566
const char *zDate = db_column_text(&q, 0);
567567
const char *zFile = db_column_text(&q, 1);
568568
const char *zUser = db_column_text(&q, 2);
569569
--- src/attach.c
+++ src/attach.c
@@ -40,16 +40,16 @@
40 Stmt q;
41
42 if( zPage && zTkt ) zTkt = 0;
43 login_check_credentials();
44 blob_zero(&sql);
45 blob_append(&sql,
46 "SELECT datetime(mtime,'localtime'), src, target, filename,"
47 " comment, user,"
48 " (SELECT uuid FROM blob WHERE rid=attachid), attachid"
49 " FROM attachment",
50 -1
51 );
52 if( zPage ){
53 if( g.perm.RdWiki==0 ) login_needed();
54 style_header("Attachments To %h", zPage);
55 blob_appendf(&sql, " WHERE target=%Q", zPage);
@@ -553,16 +553,16 @@
553 const char *zHeader /* Header to display with attachments */
554 ){
555 int cnt = 0;
556 Stmt q;
557 db_prepare(&q,
558 "SELECT datetime(mtime,'localtime'), filename, user,"
559 " (SELECT uuid FROM blob WHERE rid=attachid), src"
560 " FROM attachment"
561 " WHERE isLatest AND src!='' AND target=%Q"
562 " ORDER BY mtime DESC",
563 zTarget
564 );
565 while( db_step(&q)==SQLITE_ROW ){
566 const char *zDate = db_column_text(&q, 0);
567 const char *zFile = db_column_text(&q, 1);
568 const char *zUser = db_column_text(&q, 2);
569
--- src/attach.c
+++ src/attach.c
@@ -40,16 +40,16 @@
40 Stmt q;
41
42 if( zPage && zTkt ) zTkt = 0;
43 login_check_credentials();
44 blob_zero(&sql);
45 blob_appendf(&sql,
46 "SELECT datetime(mtime%s), src, target, filename,"
47 " comment, user,"
48 " (SELECT uuid FROM blob WHERE rid=attachid), attachid"
49 " FROM attachment",
50 timeline_utc()
51 );
52 if( zPage ){
53 if( g.perm.RdWiki==0 ) login_needed();
54 style_header("Attachments To %h", zPage);
55 blob_appendf(&sql, " WHERE target=%Q", zPage);
@@ -553,16 +553,16 @@
553 const char *zHeader /* Header to display with attachments */
554 ){
555 int cnt = 0;
556 Stmt q;
557 db_prepare(&q,
558 "SELECT datetime(mtime%s), filename, user,"
559 " (SELECT uuid FROM blob WHERE rid=attachid), src"
560 " FROM attachment"
561 " WHERE isLatest AND src!='' AND target=%Q"
562 " ORDER BY mtime DESC",
563 timeline_utc(), zTarget
564 );
565 while( db_step(&q)==SQLITE_ROW ){
566 const char *zDate = db_column_text(&q, 0);
567 const char *zFile = db_column_text(&q, 1);
568 const char *zUser = db_column_text(&q, 2);
569
+4 -2
--- src/browse.c
+++ src/browse.c
@@ -507,11 +507,13 @@
507507
508508
db_multi_exec(
509509
"CREATE TEMP TABLE filelist("
510510
" x TEXT PRIMARY KEY COLLATE nocase,"
511511
" uuid TEXT"
512
- ") WITHOUT ROWID;"
512
+ ")%s;",
513
+ /* Can be removed as soon as SQLite 3.8.2 is sufficiently wide-spread */
514
+ sqlite3_libversion_number()>=3008002 ? " WITHOUT ROWID" : ""
513515
);
514516
db_prepare(&ins, "INSERT OR IGNORE INTO filelist VALUES(:f,:u)");
515517
manifest_file_rewind(pM);
516518
while( (pFile = manifest_file_next(pM,0))!=0 ){
517519
if( nD>0
@@ -715,11 +717,11 @@
715717
fossil_fatal("not a valid check-in: %s", zName);
716718
}
717719
style_header("File Ages", zName);
718720
compute_fileage(rid);
719721
baseTime = db_double(0.0, "SELECT mtime FROM event WHERE objid=%d", rid);
720
- zBaseTime = db_text("","SELECT datetime(%.20g,'localtime')", baseTime);
722
+ zBaseTime = db_text("","SELECT datetime(%.20g%s)", baseTime, timeline_utc());
721723
@ <h2>File Ages For Check-in
722724
@ %z(href("%R/info?name=%T",zName))%h(zName)</a></h2>
723725
@
724726
@ <p>The times given are relative to
725727
@ %z(href("%R/timeline?c=%T",zBaseTime))%s(zBaseTime)</a>, which is the
726728
--- src/browse.c
+++ src/browse.c
@@ -507,11 +507,13 @@
507
508 db_multi_exec(
509 "CREATE TEMP TABLE filelist("
510 " x TEXT PRIMARY KEY COLLATE nocase,"
511 " uuid TEXT"
512 ") WITHOUT ROWID;"
 
 
513 );
514 db_prepare(&ins, "INSERT OR IGNORE INTO filelist VALUES(:f,:u)");
515 manifest_file_rewind(pM);
516 while( (pFile = manifest_file_next(pM,0))!=0 ){
517 if( nD>0
@@ -715,11 +717,11 @@
715 fossil_fatal("not a valid check-in: %s", zName);
716 }
717 style_header("File Ages", zName);
718 compute_fileage(rid);
719 baseTime = db_double(0.0, "SELECT mtime FROM event WHERE objid=%d", rid);
720 zBaseTime = db_text("","SELECT datetime(%.20g,'localtime')", baseTime);
721 @ <h2>File Ages For Check-in
722 @ %z(href("%R/info?name=%T",zName))%h(zName)</a></h2>
723 @
724 @ <p>The times given are relative to
725 @ %z(href("%R/timeline?c=%T",zBaseTime))%s(zBaseTime)</a>, which is the
726
--- src/browse.c
+++ src/browse.c
@@ -507,11 +507,13 @@
507
508 db_multi_exec(
509 "CREATE TEMP TABLE filelist("
510 " x TEXT PRIMARY KEY COLLATE nocase,"
511 " uuid TEXT"
512 ")%s;",
513 /* Can be removed as soon as SQLite 3.8.2 is sufficiently wide-spread */
514 sqlite3_libversion_number()>=3008002 ? " WITHOUT ROWID" : ""
515 );
516 db_prepare(&ins, "INSERT OR IGNORE INTO filelist VALUES(:f,:u)");
517 manifest_file_rewind(pM);
518 while( (pFile = manifest_file_next(pM,0))!=0 ){
519 if( nD>0
@@ -715,11 +717,11 @@
717 fossil_fatal("not a valid check-in: %s", zName);
718 }
719 style_header("File Ages", zName);
720 compute_fileage(rid);
721 baseTime = db_double(0.0, "SELECT mtime FROM event WHERE objid=%d", rid);
722 zBaseTime = db_text("","SELECT datetime(%.20g%s)", baseTime, timeline_utc());
723 @ <h2>File Ages For Check-in
724 @ %z(href("%R/info?name=%T",zName))%h(zName)</a></h2>
725 @
726 @ <p>The times given are relative to
727 @ %z(href("%R/timeline?c=%T",zBaseTime))%s(zBaseTime)</a>, which is the
728
+4 -2
--- src/browse.c
+++ src/browse.c
@@ -507,11 +507,13 @@
507507
508508
db_multi_exec(
509509
"CREATE TEMP TABLE filelist("
510510
" x TEXT PRIMARY KEY COLLATE nocase,"
511511
" uuid TEXT"
512
- ") WITHOUT ROWID;"
512
+ ")%s;",
513
+ /* Can be removed as soon as SQLite 3.8.2 is sufficiently wide-spread */
514
+ sqlite3_libversion_number()>=3008002 ? " WITHOUT ROWID" : ""
513515
);
514516
db_prepare(&ins, "INSERT OR IGNORE INTO filelist VALUES(:f,:u)");
515517
manifest_file_rewind(pM);
516518
while( (pFile = manifest_file_next(pM,0))!=0 ){
517519
if( nD>0
@@ -715,11 +717,11 @@
715717
fossil_fatal("not a valid check-in: %s", zName);
716718
}
717719
style_header("File Ages", zName);
718720
compute_fileage(rid);
719721
baseTime = db_double(0.0, "SELECT mtime FROM event WHERE objid=%d", rid);
720
- zBaseTime = db_text("","SELECT datetime(%.20g,'localtime')", baseTime);
722
+ zBaseTime = db_text("","SELECT datetime(%.20g%s)", baseTime, timeline_utc());
721723
@ <h2>File Ages For Check-in
722724
@ %z(href("%R/info?name=%T",zName))%h(zName)</a></h2>
723725
@
724726
@ <p>The times given are relative to
725727
@ %z(href("%R/timeline?c=%T",zBaseTime))%s(zBaseTime)</a>, which is the
726728
--- src/browse.c
+++ src/browse.c
@@ -507,11 +507,13 @@
507
508 db_multi_exec(
509 "CREATE TEMP TABLE filelist("
510 " x TEXT PRIMARY KEY COLLATE nocase,"
511 " uuid TEXT"
512 ") WITHOUT ROWID;"
 
 
513 );
514 db_prepare(&ins, "INSERT OR IGNORE INTO filelist VALUES(:f,:u)");
515 manifest_file_rewind(pM);
516 while( (pFile = manifest_file_next(pM,0))!=0 ){
517 if( nD>0
@@ -715,11 +717,11 @@
715 fossil_fatal("not a valid check-in: %s", zName);
716 }
717 style_header("File Ages", zName);
718 compute_fileage(rid);
719 baseTime = db_double(0.0, "SELECT mtime FROM event WHERE objid=%d", rid);
720 zBaseTime = db_text("","SELECT datetime(%.20g,'localtime')", baseTime);
721 @ <h2>File Ages For Check-in
722 @ %z(href("%R/info?name=%T",zName))%h(zName)</a></h2>
723 @
724 @ <p>The times given are relative to
725 @ %z(href("%R/timeline?c=%T",zBaseTime))%s(zBaseTime)</a>, which is the
726
--- src/browse.c
+++ src/browse.c
@@ -507,11 +507,13 @@
507
508 db_multi_exec(
509 "CREATE TEMP TABLE filelist("
510 " x TEXT PRIMARY KEY COLLATE nocase,"
511 " uuid TEXT"
512 ")%s;",
513 /* Can be removed as soon as SQLite 3.8.2 is sufficiently wide-spread */
514 sqlite3_libversion_number()>=3008002 ? " WITHOUT ROWID" : ""
515 );
516 db_prepare(&ins, "INSERT OR IGNORE INTO filelist VALUES(:f,:u)");
517 manifest_file_rewind(pM);
518 while( (pFile = manifest_file_next(pM,0))!=0 ){
519 if( nD>0
@@ -715,11 +717,11 @@
717 fossil_fatal("not a valid check-in: %s", zName);
718 }
719 style_header("File Ages", zName);
720 compute_fileage(rid);
721 baseTime = db_double(0.0, "SELECT mtime FROM event WHERE objid=%d", rid);
722 zBaseTime = db_text("","SELECT datetime(%.20g%s)", baseTime, timeline_utc());
723 @ <h2>File Ages For Check-in
724 @ %z(href("%R/info?name=%T",zName))%h(zName)</a></h2>
725 @
726 @ <p>The times given are relative to
727 @ %z(href("%R/timeline?c=%T",zBaseTime))%s(zBaseTime)</a>, which is the
728
+2 -2
--- src/checkin.c
+++ src/checkin.c
@@ -301,13 +301,13 @@
301301
}
302302
vfile_check_signature(vid, 0);
303303
if( showAge ){
304304
db_prepare(&q,
305305
"SELECT pathname, deleted, rid, chnged, coalesce(origname!=pathname,0),"
306
- " datetime(checkin_mtime(%d,rid),'unixepoch','localtime')"
306
+ " datetime(checkin_mtime(%d,rid),'unixepoch'%s)"
307307
" FROM vfile %s"
308
- " ORDER BY %s", vid, blob_str(&where), zOrderBy
308
+ " ORDER BY %s", vid, timeline_utc(), blob_str(&where), zOrderBy
309309
);
310310
}else{
311311
db_prepare(&q,
312312
"SELECT pathname, deleted, rid, chnged, coalesce(origname!=pathname,0)"
313313
" FROM vfile %s"
314314
--- src/checkin.c
+++ src/checkin.c
@@ -301,13 +301,13 @@
301 }
302 vfile_check_signature(vid, 0);
303 if( showAge ){
304 db_prepare(&q,
305 "SELECT pathname, deleted, rid, chnged, coalesce(origname!=pathname,0),"
306 " datetime(checkin_mtime(%d,rid),'unixepoch','localtime')"
307 " FROM vfile %s"
308 " ORDER BY %s", vid, blob_str(&where), zOrderBy
309 );
310 }else{
311 db_prepare(&q,
312 "SELECT pathname, deleted, rid, chnged, coalesce(origname!=pathname,0)"
313 " FROM vfile %s"
314
--- src/checkin.c
+++ src/checkin.c
@@ -301,13 +301,13 @@
301 }
302 vfile_check_signature(vid, 0);
303 if( showAge ){
304 db_prepare(&q,
305 "SELECT pathname, deleted, rid, chnged, coalesce(origname!=pathname,0),"
306 " datetime(checkin_mtime(%d,rid),'unixepoch'%s)"
307 " FROM vfile %s"
308 " ORDER BY %s", vid, timeline_utc(), blob_str(&where), zOrderBy
309 );
310 }else{
311 db_prepare(&q,
312 "SELECT pathname, deleted, rid, chnged, coalesce(origname!=pathname,0)"
313 " FROM vfile %s"
314
+5 -4
--- src/finfo.c
+++ src/finfo.c
@@ -164,11 +164,11 @@
164164
if( rid==0 ){
165165
fossil_fatal("no history for file: %b", &fname);
166166
}
167167
zFilename = blob_str(&fname);
168168
db_prepare(&q,
169
- "SELECT b.uuid, ci.uuid, date(event.mtime,'localtime'),"
169
+ "SELECT b.uuid, ci.uuid, date(event.mtime%s),"
170170
" coalesce(event.ecomment, event.comment),"
171171
" coalesce(event.euser, event.user),"
172172
" (SELECT value FROM tagxref WHERE tagid=%d AND tagtype>0"
173173
" AND tagxref.rid=mlink.mid)" /* Tags */
174174
" FROM mlink, blob b, event, blob ci, filename"
@@ -176,11 +176,12 @@
176176
" AND mlink.fnid=filename.fnid"
177177
" AND b.rid=mlink.fid"
178178
" AND event.objid=mlink.mid"
179179
" AND event.objid=ci.rid"
180180
" ORDER BY event.mtime DESC LIMIT %d OFFSET %d",
181
- TAG_BRANCH, zFilename, filename_collation(), iLimit, iOffset
181
+ timeline_utc(), TAG_BRANCH, zFilename, filename_collation(),
182
+ iLimit, iOffset
182183
);
183184
blob_zero(&line);
184185
if( iBrief ){
185186
fossil_print("History of %s\n", blob_str(&fname));
186187
}
@@ -302,11 +303,11 @@
302303
zFilename = PD("name","");
303304
url_add_parameter(&url, "name", zFilename);
304305
blob_zero(&sql);
305306
blob_appendf(&sql,
306307
"SELECT"
307
- " datetime(event.mtime,'localtime')," /* Date of change */
308
+ " datetime(event.mtime%s)," /* Date of change */
308309
" coalesce(event.ecomment, event.comment)," /* Check-in comment */
309310
" coalesce(event.euser, event.user)," /* User who made chng */
310311
" mlink.pid," /* Parent file rid */
311312
" mlink.fid," /* File rid */
312313
" (SELECT uuid FROM blob WHERE rid=mlink.pid)," /* Parent file uuid */
@@ -315,11 +316,11 @@
315316
" event.bgcolor," /* Background color */
316317
" (SELECT value FROM tagxref WHERE tagid=%d AND tagtype>0"
317318
" AND tagxref.rid=mlink.mid)," /* Tags */
318319
" mlink.mid," /* check-in ID */
319320
" mlink.pfnid", /* Previous filename */
320
- TAG_BRANCH
321
+ timeline_utc(), TAG_BRANCH
321322
);
322323
if( firstChngOnly ){
323324
#if 0
324325
blob_appendf(&sql, ", min(event.mtime)");
325326
#else
326327
--- src/finfo.c
+++ src/finfo.c
@@ -164,11 +164,11 @@
164 if( rid==0 ){
165 fossil_fatal("no history for file: %b", &fname);
166 }
167 zFilename = blob_str(&fname);
168 db_prepare(&q,
169 "SELECT b.uuid, ci.uuid, date(event.mtime,'localtime'),"
170 " coalesce(event.ecomment, event.comment),"
171 " coalesce(event.euser, event.user),"
172 " (SELECT value FROM tagxref WHERE tagid=%d AND tagtype>0"
173 " AND tagxref.rid=mlink.mid)" /* Tags */
174 " FROM mlink, blob b, event, blob ci, filename"
@@ -176,11 +176,12 @@
176 " AND mlink.fnid=filename.fnid"
177 " AND b.rid=mlink.fid"
178 " AND event.objid=mlink.mid"
179 " AND event.objid=ci.rid"
180 " ORDER BY event.mtime DESC LIMIT %d OFFSET %d",
181 TAG_BRANCH, zFilename, filename_collation(), iLimit, iOffset
 
182 );
183 blob_zero(&line);
184 if( iBrief ){
185 fossil_print("History of %s\n", blob_str(&fname));
186 }
@@ -302,11 +303,11 @@
302 zFilename = PD("name","");
303 url_add_parameter(&url, "name", zFilename);
304 blob_zero(&sql);
305 blob_appendf(&sql,
306 "SELECT"
307 " datetime(event.mtime,'localtime')," /* Date of change */
308 " coalesce(event.ecomment, event.comment)," /* Check-in comment */
309 " coalesce(event.euser, event.user)," /* User who made chng */
310 " mlink.pid," /* Parent file rid */
311 " mlink.fid," /* File rid */
312 " (SELECT uuid FROM blob WHERE rid=mlink.pid)," /* Parent file uuid */
@@ -315,11 +316,11 @@
315 " event.bgcolor," /* Background color */
316 " (SELECT value FROM tagxref WHERE tagid=%d AND tagtype>0"
317 " AND tagxref.rid=mlink.mid)," /* Tags */
318 " mlink.mid," /* check-in ID */
319 " mlink.pfnid", /* Previous filename */
320 TAG_BRANCH
321 );
322 if( firstChngOnly ){
323 #if 0
324 blob_appendf(&sql, ", min(event.mtime)");
325 #else
326
--- src/finfo.c
+++ src/finfo.c
@@ -164,11 +164,11 @@
164 if( rid==0 ){
165 fossil_fatal("no history for file: %b", &fname);
166 }
167 zFilename = blob_str(&fname);
168 db_prepare(&q,
169 "SELECT b.uuid, ci.uuid, date(event.mtime%s),"
170 " coalesce(event.ecomment, event.comment),"
171 " coalesce(event.euser, event.user),"
172 " (SELECT value FROM tagxref WHERE tagid=%d AND tagtype>0"
173 " AND tagxref.rid=mlink.mid)" /* Tags */
174 " FROM mlink, blob b, event, blob ci, filename"
@@ -176,11 +176,12 @@
176 " AND mlink.fnid=filename.fnid"
177 " AND b.rid=mlink.fid"
178 " AND event.objid=mlink.mid"
179 " AND event.objid=ci.rid"
180 " ORDER BY event.mtime DESC LIMIT %d OFFSET %d",
181 timeline_utc(), TAG_BRANCH, zFilename, filename_collation(),
182 iLimit, iOffset
183 );
184 blob_zero(&line);
185 if( iBrief ){
186 fossil_print("History of %s\n", blob_str(&fname));
187 }
@@ -302,11 +303,11 @@
303 zFilename = PD("name","");
304 url_add_parameter(&url, "name", zFilename);
305 blob_zero(&sql);
306 blob_appendf(&sql,
307 "SELECT"
308 " datetime(event.mtime%s)," /* Date of change */
309 " coalesce(event.ecomment, event.comment)," /* Check-in comment */
310 " coalesce(event.euser, event.user)," /* User who made chng */
311 " mlink.pid," /* Parent file rid */
312 " mlink.fid," /* File rid */
313 " (SELECT uuid FROM blob WHERE rid=mlink.pid)," /* Parent file uuid */
@@ -315,11 +316,11 @@
316 " event.bgcolor," /* Background color */
317 " (SELECT value FROM tagxref WHERE tagid=%d AND tagtype>0"
318 " AND tagxref.rid=mlink.mid)," /* Tags */
319 " mlink.mid," /* check-in ID */
320 " mlink.pfnid", /* Previous filename */
321 timeline_utc(), TAG_BRANCH
322 );
323 if( firstChngOnly ){
324 #if 0
325 blob_appendf(&sql, ", min(event.mtime)");
326 #else
327
+5 -5
--- src/info.c
+++ src/info.c
@@ -230,15 +230,15 @@
230230
Stmt q;
231231
int cnt = 0;
232232
db_prepare(&q,
233233
"SELECT tag.tagid, tagname, "
234234
" (SELECT uuid FROM blob WHERE rid=tagxref.srcid AND rid!=%d),"
235
- " value, datetime(tagxref.mtime,'localtime'), tagtype,"
235
+ " value, datetime(tagxref.mtime%s), tagtype,"
236236
" (SELECT uuid FROM blob WHERE rid=tagxref.origid AND rid!=%d)"
237237
" FROM tagxref JOIN tag ON tagxref.tagid=tag.tagid"
238238
" WHERE tagxref.rid=%d AND tagname NOT GLOB '%q'"
239
- " ORDER BY tagname /*sort*/", rid, rid, rid, zNotGlob
239
+ " ORDER BY tagname /*sort*/", rid, timeline_utc(), rid, rid, zNotGlob
240240
);
241241
while( db_step(&q)==SQLITE_ROW ){
242242
const char *zTagname = db_column_text(&q, 1);
243243
const char *zSrcUuid = db_column_text(&q, 2);
244244
const char *zValue = db_column_text(&q, 3);
@@ -503,16 +503,16 @@
503503
" WHERE plink.cid=%d AND blob.rid=plink.pid AND plink.isprim",
504504
rid
505505
);
506506
isLeaf = is_a_leaf(rid);
507507
db_prepare(&q1,
508
- "SELECT uuid, datetime(mtime, 'localtime'), user, comment,"
509
- " datetime(omtime, 'localtime'), mtime"
508
+ "SELECT uuid, datetime(mtime%s), user, comment,"
509
+ " datetime(omtime%s), mtime"
510510
" FROM blob, event"
511511
" WHERE blob.rid=%d"
512512
" AND event.objid=%d",
513
- rid, rid
513
+ timeline_utc(), timeline_utc(), rid, rid
514514
);
515515
sideBySide = !is_false(PD("sbs","1"));
516516
if( db_step(&q1)==SQLITE_ROW ){
517517
const char *zUuid = db_column_text(&q1, 0);
518518
char *zTitle = mprintf("Check-in [%.10s]", zUuid);
519519
--- src/info.c
+++ src/info.c
@@ -230,15 +230,15 @@
230 Stmt q;
231 int cnt = 0;
232 db_prepare(&q,
233 "SELECT tag.tagid, tagname, "
234 " (SELECT uuid FROM blob WHERE rid=tagxref.srcid AND rid!=%d),"
235 " value, datetime(tagxref.mtime,'localtime'), tagtype,"
236 " (SELECT uuid FROM blob WHERE rid=tagxref.origid AND rid!=%d)"
237 " FROM tagxref JOIN tag ON tagxref.tagid=tag.tagid"
238 " WHERE tagxref.rid=%d AND tagname NOT GLOB '%q'"
239 " ORDER BY tagname /*sort*/", rid, rid, rid, zNotGlob
240 );
241 while( db_step(&q)==SQLITE_ROW ){
242 const char *zTagname = db_column_text(&q, 1);
243 const char *zSrcUuid = db_column_text(&q, 2);
244 const char *zValue = db_column_text(&q, 3);
@@ -503,16 +503,16 @@
503 " WHERE plink.cid=%d AND blob.rid=plink.pid AND plink.isprim",
504 rid
505 );
506 isLeaf = is_a_leaf(rid);
507 db_prepare(&q1,
508 "SELECT uuid, datetime(mtime, 'localtime'), user, comment,"
509 " datetime(omtime, 'localtime'), mtime"
510 " FROM blob, event"
511 " WHERE blob.rid=%d"
512 " AND event.objid=%d",
513 rid, rid
514 );
515 sideBySide = !is_false(PD("sbs","1"));
516 if( db_step(&q1)==SQLITE_ROW ){
517 const char *zUuid = db_column_text(&q1, 0);
518 char *zTitle = mprintf("Check-in [%.10s]", zUuid);
519
--- src/info.c
+++ src/info.c
@@ -230,15 +230,15 @@
230 Stmt q;
231 int cnt = 0;
232 db_prepare(&q,
233 "SELECT tag.tagid, tagname, "
234 " (SELECT uuid FROM blob WHERE rid=tagxref.srcid AND rid!=%d),"
235 " value, datetime(tagxref.mtime%s), tagtype,"
236 " (SELECT uuid FROM blob WHERE rid=tagxref.origid AND rid!=%d)"
237 " FROM tagxref JOIN tag ON tagxref.tagid=tag.tagid"
238 " WHERE tagxref.rid=%d AND tagname NOT GLOB '%q'"
239 " ORDER BY tagname /*sort*/", rid, timeline_utc(), rid, rid, zNotGlob
240 );
241 while( db_step(&q)==SQLITE_ROW ){
242 const char *zTagname = db_column_text(&q, 1);
243 const char *zSrcUuid = db_column_text(&q, 2);
244 const char *zValue = db_column_text(&q, 3);
@@ -503,16 +503,16 @@
503 " WHERE plink.cid=%d AND blob.rid=plink.pid AND plink.isprim",
504 rid
505 );
506 isLeaf = is_a_leaf(rid);
507 db_prepare(&q1,
508 "SELECT uuid, datetime(mtime%s), user, comment,"
509 " datetime(omtime%s), mtime"
510 " FROM blob, event"
511 " WHERE blob.rid=%d"
512 " AND event.objid=%d",
513 timeline_utc(), timeline_utc(), rid, rid
514 );
515 sideBySide = !is_false(PD("sbs","1"));
516 if( db_step(&q1)==SQLITE_ROW ){
517 const char *zUuid = db_column_text(&q1, 0);
518 char *zTitle = mprintf("Check-in [%.10s]", zUuid);
519
+1 -2
--- src/main.mk
+++ src/main.mk
@@ -376,12 +376,11 @@
376376
377377
$(OBJDIR)/VERSION.h: $(SRCDIR)/../manifest.uuid $(SRCDIR)/../manifest $(SRCDIR)/../VERSION $(OBJDIR)/mkversion
378378
$(OBJDIR)/mkversion $(SRCDIR)/../manifest.uuid $(SRCDIR)/../manifest $(SRCDIR)/../VERSION >$(OBJDIR)/VERSION.h
379379
380380
# Setup the options used to compile the included SQLite library.
381
-SQLITE_OPTIONS = -Dlocaltime=fossil_localtime \
382
- -DSQLITE_OMIT_LOAD_EXTENSION=1 \
381
+SQLITE_OPTIONS = -DSQLITE_OMIT_LOAD_EXTENSION=1 \
383382
-DSQLITE_ENABLE_LOCKING_STYLE=0 \
384383
-DSQLITE_THREADSAFE=0 \
385384
-DSQLITE_DEFAULT_FILE_FORMAT=4 \
386385
-DSQLITE_OMIT_DEPRECATED \
387386
-DSQLITE_ENABLE_EXPLAIN_COMMENTS
388387
--- src/main.mk
+++ src/main.mk
@@ -376,12 +376,11 @@
376
377 $(OBJDIR)/VERSION.h: $(SRCDIR)/../manifest.uuid $(SRCDIR)/../manifest $(SRCDIR)/../VERSION $(OBJDIR)/mkversion
378 $(OBJDIR)/mkversion $(SRCDIR)/../manifest.uuid $(SRCDIR)/../manifest $(SRCDIR)/../VERSION >$(OBJDIR)/VERSION.h
379
380 # Setup the options used to compile the included SQLite library.
381 SQLITE_OPTIONS = -Dlocaltime=fossil_localtime \
382 -DSQLITE_OMIT_LOAD_EXTENSION=1 \
383 -DSQLITE_ENABLE_LOCKING_STYLE=0 \
384 -DSQLITE_THREADSAFE=0 \
385 -DSQLITE_DEFAULT_FILE_FORMAT=4 \
386 -DSQLITE_OMIT_DEPRECATED \
387 -DSQLITE_ENABLE_EXPLAIN_COMMENTS
388
--- src/main.mk
+++ src/main.mk
@@ -376,12 +376,11 @@
376
377 $(OBJDIR)/VERSION.h: $(SRCDIR)/../manifest.uuid $(SRCDIR)/../manifest $(SRCDIR)/../VERSION $(OBJDIR)/mkversion
378 $(OBJDIR)/mkversion $(SRCDIR)/../manifest.uuid $(SRCDIR)/../manifest $(SRCDIR)/../VERSION >$(OBJDIR)/VERSION.h
379
380 # Setup the options used to compile the included SQLite library.
381 SQLITE_OPTIONS = -DSQLITE_OMIT_LOAD_EXTENSION=1 \
 
382 -DSQLITE_ENABLE_LOCKING_STYLE=0 \
383 -DSQLITE_THREADSAFE=0 \
384 -DSQLITE_DEFAULT_FILE_FORMAT=4 \
385 -DSQLITE_OMIT_DEPRECATED \
386 -DSQLITE_ENABLE_EXPLAIN_COMMENTS
387
--- src/makemake.tcl
+++ src/makemake.tcl
@@ -129,11 +129,10 @@
129129
}
130130
131131
# Options used to compile the included SQLite library.
132132
#
133133
set SQLITE_OPTIONS {
134
- -Dlocaltime=fossil_localtime
135134
-DSQLITE_OMIT_LOAD_EXTENSION=1
136135
-DSQLITE_ENABLE_LOCKING_STYLE=0
137136
-DSQLITE_THREADSAFE=0
138137
-DSQLITE_DEFAULT_FILE_FORMAT=4
139138
-DSQLITE_OMIT_DEPRECATED
140139
--- src/makemake.tcl
+++ src/makemake.tcl
@@ -129,11 +129,10 @@
129 }
130
131 # Options used to compile the included SQLite library.
132 #
133 set SQLITE_OPTIONS {
134 -Dlocaltime=fossil_localtime
135 -DSQLITE_OMIT_LOAD_EXTENSION=1
136 -DSQLITE_ENABLE_LOCKING_STYLE=0
137 -DSQLITE_THREADSAFE=0
138 -DSQLITE_DEFAULT_FILE_FORMAT=4
139 -DSQLITE_OMIT_DEPRECATED
140
--- src/makemake.tcl
+++ src/makemake.tcl
@@ -129,11 +129,10 @@
129 }
130
131 # Options used to compile the included SQLite library.
132 #
133 set SQLITE_OPTIONS {
 
134 -DSQLITE_OMIT_LOAD_EXTENSION=1
135 -DSQLITE_ENABLE_LOCKING_STYLE=0
136 -DSQLITE_THREADSAFE=0
137 -DSQLITE_DEFAULT_FILE_FORMAT=4
138 -DSQLITE_OMIT_DEPRECATED
139
+4 -4
--- src/merge.c
+++ src/merge.c
@@ -26,17 +26,17 @@
2626
** Print information about a particular check-in.
2727
*/
2828
void print_checkin_description(int rid, int indent, const char *zLabel){
2929
Stmt q;
3030
db_prepare(&q,
31
- "SELECT datetime(mtime,'localtime'),"
31
+ "SELECT datetime(mtime%s),"
3232
" coalesce(euser,user), coalesce(ecomment,comment),"
3333
" (SELECT uuid FROM blob WHERE rid=%d),"
3434
" (SELECT group_concat(substr(tagname,5), ', ') FROM tag, tagxref"
3535
" WHERE tagname GLOB 'sym-*' AND tag.tagid=tagxref.tagid"
3636
" AND tagxref.rid=%d AND tagxref.tagtype>0)"
37
- " FROM event WHERE objid=%d", rid, rid, rid);
37
+ " FROM event WHERE objid=%d", timeline_utc(), rid, rid, rid);
3838
if( db_step(&q)==SQLITE_ROW ){
3939
const char *zTagList = db_column_text(&q, 4);
4040
char *zCom;
4141
if( zTagList && zTagList[0] ){
4242
zCom = mprintf("%s (%s)", db_column_text(&q, 2), zTagList);
@@ -195,16 +195,16 @@
195195
TAG_BRANCH, vid)
196196
);
197197
}
198198
db_prepare(&q,
199199
"SELECT blob.uuid,"
200
- " datetime(event.mtime,'localtime'),"
200
+ " datetime(event.mtime%s),"
201201
" coalesce(ecomment, comment),"
202202
" coalesce(euser, user)"
203203
" FROM event, blob"
204204
" WHERE event.objid=%d AND blob.rid=%d",
205
- mid, mid
205
+ timeline_utc(), mid, mid
206206
);
207207
if( db_step(&q)==SQLITE_ROW ){
208208
char *zCom = mprintf("Merging fork [%S] at %s by %s: \"%s\"",
209209
db_column_text(&q, 0), db_column_text(&q, 1),
210210
db_column_text(&q, 3), db_column_text(&q, 2));
211211
--- src/merge.c
+++ src/merge.c
@@ -26,17 +26,17 @@
26 ** Print information about a particular check-in.
27 */
28 void print_checkin_description(int rid, int indent, const char *zLabel){
29 Stmt q;
30 db_prepare(&q,
31 "SELECT datetime(mtime,'localtime'),"
32 " coalesce(euser,user), coalesce(ecomment,comment),"
33 " (SELECT uuid FROM blob WHERE rid=%d),"
34 " (SELECT group_concat(substr(tagname,5), ', ') FROM tag, tagxref"
35 " WHERE tagname GLOB 'sym-*' AND tag.tagid=tagxref.tagid"
36 " AND tagxref.rid=%d AND tagxref.tagtype>0)"
37 " FROM event WHERE objid=%d", rid, rid, rid);
38 if( db_step(&q)==SQLITE_ROW ){
39 const char *zTagList = db_column_text(&q, 4);
40 char *zCom;
41 if( zTagList && zTagList[0] ){
42 zCom = mprintf("%s (%s)", db_column_text(&q, 2), zTagList);
@@ -195,16 +195,16 @@
195 TAG_BRANCH, vid)
196 );
197 }
198 db_prepare(&q,
199 "SELECT blob.uuid,"
200 " datetime(event.mtime,'localtime'),"
201 " coalesce(ecomment, comment),"
202 " coalesce(euser, user)"
203 " FROM event, blob"
204 " WHERE event.objid=%d AND blob.rid=%d",
205 mid, mid
206 );
207 if( db_step(&q)==SQLITE_ROW ){
208 char *zCom = mprintf("Merging fork [%S] at %s by %s: \"%s\"",
209 db_column_text(&q, 0), db_column_text(&q, 1),
210 db_column_text(&q, 3), db_column_text(&q, 2));
211
--- src/merge.c
+++ src/merge.c
@@ -26,17 +26,17 @@
26 ** Print information about a particular check-in.
27 */
28 void print_checkin_description(int rid, int indent, const char *zLabel){
29 Stmt q;
30 db_prepare(&q,
31 "SELECT datetime(mtime%s),"
32 " coalesce(euser,user), coalesce(ecomment,comment),"
33 " (SELECT uuid FROM blob WHERE rid=%d),"
34 " (SELECT group_concat(substr(tagname,5), ', ') FROM tag, tagxref"
35 " WHERE tagname GLOB 'sym-*' AND tag.tagid=tagxref.tagid"
36 " AND tagxref.rid=%d AND tagxref.tagtype>0)"
37 " FROM event WHERE objid=%d", timeline_utc(), rid, rid, rid);
38 if( db_step(&q)==SQLITE_ROW ){
39 const char *zTagList = db_column_text(&q, 4);
40 char *zCom;
41 if( zTagList && zTagList[0] ){
42 zCom = mprintf("%s (%s)", db_column_text(&q, 2), zTagList);
@@ -195,16 +195,16 @@
195 TAG_BRANCH, vid)
196 );
197 }
198 db_prepare(&q,
199 "SELECT blob.uuid,"
200 " datetime(event.mtime%s),"
201 " coalesce(ecomment, comment),"
202 " coalesce(euser, user)"
203 " FROM event, blob"
204 " WHERE event.objid=%d AND blob.rid=%d",
205 timeline_utc(), mid, mid
206 );
207 if( db_step(&q)==SQLITE_ROW ){
208 char *zCom = mprintf("Merging fork [%S] at %s by %s: \"%s\"",
209 db_column_text(&q, 0), db_column_text(&q, 1),
210 db_column_text(&q, 3), db_column_text(&q, 2));
211
+6 -6
--- src/name.c
+++ src/name.c
@@ -458,18 +458,18 @@
458458
}else if( rid==0 ){
459459
fossil_print("Unknown artifact: %s\n", zName);
460460
}else{
461461
Stmt q;
462462
db_prepare(&q,
463
- "SELECT uuid, size, datetime(mtime, 'localtime'), ipaddr,"
463
+ "SELECT uuid, size, datetime(mtime%s), ipaddr,"
464464
" (SELECT group_concat(substr(tagname,5), ', ') FROM tag, tagxref"
465465
" WHERE tagname GLOB 'sym-*' AND tag.tagid=tagxref.tagid"
466466
" AND tagxref.rid=blob.rid AND tagxref.tagtype>0)"
467467
" FROM blob, rcvfrom"
468468
" WHERE rid=%d"
469469
" AND rcvfrom.rcvid=blob.rcvid",
470
- rid);
470
+ timeline_utc(), rid);
471471
if( db_step(&q)==SQLITE_ROW ){
472472
const char *zTagList = db_column_text(&q, 4);
473473
if( verboseFlag ){
474474
fossil_print("artifact: %s (%d)\n", db_column_text(&q,0), rid);
475475
fossil_print("size: %d bytes\n", db_column_int(&q,1));
@@ -484,13 +484,13 @@
484484
fossil_print("tags: %s\n", zTagList);
485485
}
486486
}
487487
db_finalize(&q);
488488
db_prepare(&q,
489
- "SELECT type, datetime(mtime,'localtime'),"
489
+ "SELECT type, datetime(mtime%s),"
490490
" coalesce(euser,user), coalesce(ecomment,comment)"
491
- " FROM event WHERE objid=%d", rid);
491
+ " FROM event WHERE objid=%d", timeline_utc(), rid);
492492
if( db_step(&q)==SQLITE_ROW ){
493493
const char *zType;
494494
switch( db_column_text(&q,0)[0] ){
495495
case 'c': zType = "Check-in"; break;
496496
case 'w': zType = "Wiki-edit"; break;
@@ -504,19 +504,19 @@
504504
fossil_print("comment: ");
505505
comment_print(db_column_text(&q,3), 10, 78);
506506
}
507507
db_finalize(&q);
508508
db_prepare(&q,
509
- "SELECT filename.name, blob.uuid, datetime(event.mtime,'localtime'),"
509
+ "SELECT filename.name, blob.uuid, datetime(event.mtime%s),"
510510
" coalesce(euser,user), coalesce(ecomment,comment)"
511511
" FROM mlink, filename, blob, event"
512512
" WHERE mlink.fid=%d"
513513
" AND filename.fnid=mlink.fnid"
514514
" AND event.objid=mlink.mid"
515515
" AND blob.rid=mlink.mid"
516516
" ORDER BY event.mtime DESC /*sort*/",
517
- rid);
517
+ timeline_utc(), rid);
518518
while( db_step(&q)==SQLITE_ROW ){
519519
fossil_print("file: %s\n", db_column_text(&q,0));
520520
fossil_print(" part of [%.10s] by %s on %s\n",
521521
db_column_text(&q, 1),
522522
db_column_text(&q, 3),
523523
--- src/name.c
+++ src/name.c
@@ -458,18 +458,18 @@
458 }else if( rid==0 ){
459 fossil_print("Unknown artifact: %s\n", zName);
460 }else{
461 Stmt q;
462 db_prepare(&q,
463 "SELECT uuid, size, datetime(mtime, 'localtime'), ipaddr,"
464 " (SELECT group_concat(substr(tagname,5), ', ') FROM tag, tagxref"
465 " WHERE tagname GLOB 'sym-*' AND tag.tagid=tagxref.tagid"
466 " AND tagxref.rid=blob.rid AND tagxref.tagtype>0)"
467 " FROM blob, rcvfrom"
468 " WHERE rid=%d"
469 " AND rcvfrom.rcvid=blob.rcvid",
470 rid);
471 if( db_step(&q)==SQLITE_ROW ){
472 const char *zTagList = db_column_text(&q, 4);
473 if( verboseFlag ){
474 fossil_print("artifact: %s (%d)\n", db_column_text(&q,0), rid);
475 fossil_print("size: %d bytes\n", db_column_int(&q,1));
@@ -484,13 +484,13 @@
484 fossil_print("tags: %s\n", zTagList);
485 }
486 }
487 db_finalize(&q);
488 db_prepare(&q,
489 "SELECT type, datetime(mtime,'localtime'),"
490 " coalesce(euser,user), coalesce(ecomment,comment)"
491 " FROM event WHERE objid=%d", rid);
492 if( db_step(&q)==SQLITE_ROW ){
493 const char *zType;
494 switch( db_column_text(&q,0)[0] ){
495 case 'c': zType = "Check-in"; break;
496 case 'w': zType = "Wiki-edit"; break;
@@ -504,19 +504,19 @@
504 fossil_print("comment: ");
505 comment_print(db_column_text(&q,3), 10, 78);
506 }
507 db_finalize(&q);
508 db_prepare(&q,
509 "SELECT filename.name, blob.uuid, datetime(event.mtime,'localtime'),"
510 " coalesce(euser,user), coalesce(ecomment,comment)"
511 " FROM mlink, filename, blob, event"
512 " WHERE mlink.fid=%d"
513 " AND filename.fnid=mlink.fnid"
514 " AND event.objid=mlink.mid"
515 " AND blob.rid=mlink.mid"
516 " ORDER BY event.mtime DESC /*sort*/",
517 rid);
518 while( db_step(&q)==SQLITE_ROW ){
519 fossil_print("file: %s\n", db_column_text(&q,0));
520 fossil_print(" part of [%.10s] by %s on %s\n",
521 db_column_text(&q, 1),
522 db_column_text(&q, 3),
523
--- src/name.c
+++ src/name.c
@@ -458,18 +458,18 @@
458 }else if( rid==0 ){
459 fossil_print("Unknown artifact: %s\n", zName);
460 }else{
461 Stmt q;
462 db_prepare(&q,
463 "SELECT uuid, size, datetime(mtime%s), ipaddr,"
464 " (SELECT group_concat(substr(tagname,5), ', ') FROM tag, tagxref"
465 " WHERE tagname GLOB 'sym-*' AND tag.tagid=tagxref.tagid"
466 " AND tagxref.rid=blob.rid AND tagxref.tagtype>0)"
467 " FROM blob, rcvfrom"
468 " WHERE rid=%d"
469 " AND rcvfrom.rcvid=blob.rcvid",
470 timeline_utc(), rid);
471 if( db_step(&q)==SQLITE_ROW ){
472 const char *zTagList = db_column_text(&q, 4);
473 if( verboseFlag ){
474 fossil_print("artifact: %s (%d)\n", db_column_text(&q,0), rid);
475 fossil_print("size: %d bytes\n", db_column_int(&q,1));
@@ -484,13 +484,13 @@
484 fossil_print("tags: %s\n", zTagList);
485 }
486 }
487 db_finalize(&q);
488 db_prepare(&q,
489 "SELECT type, datetime(mtime%s),"
490 " coalesce(euser,user), coalesce(ecomment,comment)"
491 " FROM event WHERE objid=%d", timeline_utc(), rid);
492 if( db_step(&q)==SQLITE_ROW ){
493 const char *zType;
494 switch( db_column_text(&q,0)[0] ){
495 case 'c': zType = "Check-in"; break;
496 case 'w': zType = "Wiki-edit"; break;
@@ -504,19 +504,19 @@
504 fossil_print("comment: ");
505 comment_print(db_column_text(&q,3), 10, 78);
506 }
507 db_finalize(&q);
508 db_prepare(&q,
509 "SELECT filename.name, blob.uuid, datetime(event.mtime%s),"
510 " coalesce(euser,user), coalesce(ecomment,comment)"
511 " FROM mlink, filename, blob, event"
512 " WHERE mlink.fid=%d"
513 " AND filename.fnid=mlink.fnid"
514 " AND event.objid=mlink.mid"
515 " AND blob.rid=mlink.mid"
516 " ORDER BY event.mtime DESC /*sort*/",
517 timeline_utc(), rid);
518 while( db_step(&q)==SQLITE_ROW ){
519 fossil_print("file: %s\n", db_column_text(&q,0));
520 fossil_print(" part of [%.10s] by %s on %s\n",
521 db_column_text(&q, 1),
522 db_column_text(&q, 3),
523
--- src/report.c
+++ src/report.c
@@ -210,11 +210,10 @@
210210
211211
/*
212212
** Activate the query authorizer
213213
*/
214214
static void report_restrict_sql(char **pzErr){
215
- (void)fossil_localtime(0);
216215
sqlite3_set_authorizer(g.db, report_query_authorizer, (void*)pzErr);
217216
}
218217
static void report_unrestrict_sql(void){
219218
sqlite3_set_authorizer(g.db, 0, 0);
220219
}
221220
--- src/report.c
+++ src/report.c
@@ -210,11 +210,10 @@
210
211 /*
212 ** Activate the query authorizer
213 */
214 static void report_restrict_sql(char **pzErr){
215 (void)fossil_localtime(0);
216 sqlite3_set_authorizer(g.db, report_query_authorizer, (void*)pzErr);
217 }
218 static void report_unrestrict_sql(void){
219 sqlite3_set_authorizer(g.db, 0, 0);
220 }
221
--- src/report.c
+++ src/report.c
@@ -210,11 +210,10 @@
210
211 /*
212 ** Activate the query authorizer
213 */
214 static void report_restrict_sql(char **pzErr){
 
215 sqlite3_set_authorizer(g.db, report_query_authorizer, (void*)pzErr);
216 }
217 static void report_unrestrict_sql(void){
218 sqlite3_set_authorizer(g.db, 0, 0);
219 }
220
+3 -2
--- src/search.c
+++ src/search.c
@@ -206,15 +206,16 @@
206206
207207
db_multi_exec(
208208
"CREATE TEMP TABLE srch(rid,uuid,date,comment,x);"
209209
"CREATE INDEX srch_idx1 ON srch(x);"
210210
"INSERT INTO srch(rid,uuid,date,comment,x)"
211
- " SELECT blob.rid, uuid, datetime(event.mtime, 'localtime'),"
211
+ " SELECT blob.rid, uuid, datetime(event.mtime%s),"
212212
" coalesce(ecomment,comment),"
213213
" score(coalesce(ecomment,comment)) AS y"
214214
" FROM event, blob"
215
- " WHERE blob.rid=event.objid AND y>0;"
215
+ " WHERE blob.rid=event.objid AND y>0;",
216
+ timeline_utc()
216217
);
217218
iBest = db_int(0, "SELECT max(x) FROM srch");
218219
blob_append(&sql,
219220
"SELECT rid, uuid, date, comment, 0, 0 FROM srch "
220221
"WHERE 1 ", -1);
221222
--- src/search.c
+++ src/search.c
@@ -206,15 +206,16 @@
206
207 db_multi_exec(
208 "CREATE TEMP TABLE srch(rid,uuid,date,comment,x);"
209 "CREATE INDEX srch_idx1 ON srch(x);"
210 "INSERT INTO srch(rid,uuid,date,comment,x)"
211 " SELECT blob.rid, uuid, datetime(event.mtime, 'localtime'),"
212 " coalesce(ecomment,comment),"
213 " score(coalesce(ecomment,comment)) AS y"
214 " FROM event, blob"
215 " WHERE blob.rid=event.objid AND y>0;"
 
216 );
217 iBest = db_int(0, "SELECT max(x) FROM srch");
218 blob_append(&sql,
219 "SELECT rid, uuid, date, comment, 0, 0 FROM srch "
220 "WHERE 1 ", -1);
221
--- src/search.c
+++ src/search.c
@@ -206,15 +206,16 @@
206
207 db_multi_exec(
208 "CREATE TEMP TABLE srch(rid,uuid,date,comment,x);"
209 "CREATE INDEX srch_idx1 ON srch(x);"
210 "INSERT INTO srch(rid,uuid,date,comment,x)"
211 " SELECT blob.rid, uuid, datetime(event.mtime%s),"
212 " coalesce(ecomment,comment),"
213 " score(coalesce(ecomment,comment)) AS y"
214 " FROM event, blob"
215 " WHERE blob.rid=event.objid AND y>0;",
216 timeline_utc()
217 );
218 iBest = db_int(0, "SELECT max(x) FROM srch");
219 blob_append(&sql,
220 "SELECT rid, uuid, date, comment, 0, 0 FROM srch "
221 "WHERE 1 ", -1);
222
--- src/setup.c
+++ src/setup.c
@@ -1184,11 +1184,10 @@
11841184
@ <hr />
11851185
onoff_attribute("Use Universal Coordinated Time (UTC)",
11861186
"timeline-utc", "utc", 1, 0);
11871187
@ <p>Show times as UTC (also sometimes called Greenwich Mean Time (GMT) or
11881188
@ Zulu) instead of in local time. On this server, local time is currently
1189
- g.fTimeFormat = 2;
11901189
tmDiff = db_double(0.0, "SELECT julianday('now')");
11911190
tmDiff = db_double(0.0,
11921191
"SELECT (julianday(%.17g,'localtime')-julianday(%.17g))*24.0",
11931192
tmDiff, tmDiff);
11941193
sqlite3_snprintf(sizeof(zTmDiff), zTmDiff, "%.1f", tmDiff);
11951194
--- src/setup.c
+++ src/setup.c
@@ -1184,11 +1184,10 @@
1184 @ <hr />
1185 onoff_attribute("Use Universal Coordinated Time (UTC)",
1186 "timeline-utc", "utc", 1, 0);
1187 @ <p>Show times as UTC (also sometimes called Greenwich Mean Time (GMT) or
1188 @ Zulu) instead of in local time. On this server, local time is currently
1189 g.fTimeFormat = 2;
1190 tmDiff = db_double(0.0, "SELECT julianday('now')");
1191 tmDiff = db_double(0.0,
1192 "SELECT (julianday(%.17g,'localtime')-julianday(%.17g))*24.0",
1193 tmDiff, tmDiff);
1194 sqlite3_snprintf(sizeof(zTmDiff), zTmDiff, "%.1f", tmDiff);
1195
--- src/setup.c
+++ src/setup.c
@@ -1184,11 +1184,10 @@
1184 @ <hr />
1185 onoff_attribute("Use Universal Coordinated Time (UTC)",
1186 "timeline-utc", "utc", 1, 0);
1187 @ <p>Show times as UTC (also sometimes called Greenwich Mean Time (GMT) or
1188 @ Zulu) instead of in local time. On this server, local time is currently
 
1189 tmDiff = db_double(0.0, "SELECT julianday('now')");
1190 tmDiff = db_double(0.0,
1191 "SELECT (julianday(%.17g,'localtime')-julianday(%.17g))*24.0",
1192 tmDiff, tmDiff);
1193 sqlite3_snprintf(sizeof(zTmDiff), zTmDiff, "%.1f", tmDiff);
1194
+1 -1
--- src/th_main.c
+++ src/th_main.c
@@ -255,11 +255,11 @@
255255
const char **argv,
256256
int *argl
257257
){
258258
char *zOut;
259259
if( argc>=2 && argl[1]==6 && memcmp(argv[1],"-local",6)==0 ){
260
- zOut = db_text("??", "SELECT datetime('now','localtime')");
260
+ zOut = db_text("??", "SELECT datetime('now'%s)", timeline_utc());
261261
}else{
262262
zOut = db_text("??", "SELECT datetime('now')");
263263
}
264264
Th_SetResult(interp, zOut, -1);
265265
free(zOut);
266266
--- src/th_main.c
+++ src/th_main.c
@@ -255,11 +255,11 @@
255 const char **argv,
256 int *argl
257 ){
258 char *zOut;
259 if( argc>=2 && argl[1]==6 && memcmp(argv[1],"-local",6)==0 ){
260 zOut = db_text("??", "SELECT datetime('now','localtime')");
261 }else{
262 zOut = db_text("??", "SELECT datetime('now')");
263 }
264 Th_SetResult(interp, zOut, -1);
265 free(zOut);
266
--- src/th_main.c
+++ src/th_main.c
@@ -255,11 +255,11 @@
255 const char **argv,
256 int *argl
257 ){
258 char *zOut;
259 if( argc>=2 && argl[1]==6 && memcmp(argv[1],"-local",6)==0 ){
260 zOut = db_text("??", "SELECT datetime('now'%s)", timeline_utc());
261 }else{
262 zOut = db_text("??", "SELECT datetime('now')");
263 }
264 Th_SetResult(interp, zOut, -1);
265 free(zOut);
266
+19 -15
--- src/timeline.c
+++ src/timeline.c
@@ -904,15 +904,16 @@
904904
/*
905905
** Return a pointer to a constant string that forms the basis
906906
** for a timeline query for the WWW interface.
907907
*/
908908
const char *timeline_query_for_www(void){
909
+ static const char *zBase = 0;
909910
static const char zBaseSql[] =
910911
@ SELECT
911912
@ blob.rid AS blobRid,
912913
@ uuid AS uuid,
913
- @ datetime(event.mtime,'localtime') AS timestamp,
914
+ @ datetime(event.mtime%s) AS timestamp,
914915
@ coalesce(ecomment, comment) AS comment,
915916
@ coalesce(euser, user) AS user,
916917
@ blob.rid IN leaf AS leaf,
917918
@ bgcolor AS bgColor,
918919
@ event.type AS eventType,
@@ -923,11 +924,14 @@
923924
@ brief AS brief,
924925
@ event.mtime AS mtime
925926
@ FROM event CROSS JOIN blob
926927
@ WHERE blob.rid=event.objid
927928
;
928
- return zBaseSql;
929
+ if( zBase==0 ){
930
+ zBase = mprintf(zBaseSql, timeline_utc());
931
+ }
932
+ return zBase;
929933
}
930934
931935
/*
932936
** Generate a submenu element with a single parameter change.
933937
*/
@@ -1671,15 +1675,16 @@
16711675
/*
16721676
** Return a pointer to a static string that forms the basis for
16731677
** a timeline query for display on a TTY.
16741678
*/
16751679
const char *timeline_query_for_tty(void){
1680
+ static const char *zBase = 0;
16761681
static const char zBaseSql[] =
16771682
@ SELECT
16781683
@ blob.rid AS rid,
16791684
@ uuid,
1680
- @ datetime(event.mtime,'localtime') AS mDateTime,
1685
+ @ datetime(event.mtime%s) AS mDateTime,
16811686
@ coalesce(ecomment,comment)
16821687
@ || ' (user: ' || coalesce(euser,user,'?')
16831688
@ || (SELECT case when length(x)>0 then ' tags: ' || x else '' end
16841689
@ FROM (SELECT group_concat(substr(tagname,5), ', ') AS x
16851690
@ FROM tag, tagxref
@@ -1696,11 +1701,14 @@
16961701
@ AND tagxref.tagtype>0
16971702
@ AND tagxref.rid=blob.rid
16981703
@ WHERE blob.rid=event.objid
16991704
@ AND tag.tagname='branch'
17001705
;
1701
- return zBaseSql;
1706
+ if( zBase==0 ){
1707
+ zBase = mprintf(zBaseSql, timeline_utc());
1708
+ }
1709
+ return zBase;
17021710
}
17031711
17041712
/*
17051713
** Return true if the input string is a date in the ISO 8601 format:
17061714
** YYYY-MM-DD.
@@ -1876,32 +1884,28 @@
18761884
print_timeline(&q, n, width, verboseFlag);
18771885
db_finalize(&q);
18781886
}
18791887
18801888
/*
1881
-** This is a version of the "localtime()" function from the standard
1882
-** C library. It converts a unix timestamp (seconds since 1970) into
1883
-** a broken-out local time structure.
1889
+** Return one of two things:
1890
+**
1891
+** ",'localtime'" if the timeline-utc property is set to 0.
18841892
**
1885
-** This modified version of localtime() works like the library localtime()
1886
-** by default. Except if the timeline-utc property is set, this routine
1887
-** uses gmttime() instead. Thus by setting the timeline-utc property, we
1888
-** can get all localtimes to be displayed at UTC time.
1893
+** "" (empty string) otherwise.
18891894
*/
1890
-struct tm *fossil_localtime(const time_t *clock){
1895
+const char *timeline_utc(){
18911896
if( g.fTimeFormat==0 ){
18921897
if( db_get_int("timeline-utc", 1) ){
18931898
g.fTimeFormat = 1;
18941899
}else{
18951900
g.fTimeFormat = 2;
18961901
}
18971902
}
1898
- if( clock==0 ) return 0;
18991903
if( g.fTimeFormat==1 ){
1900
- return gmtime(clock);
1904
+ return "";
19011905
}else{
1902
- return localtime(clock);
1906
+ return ",'localtime'";
19031907
}
19041908
}
19051909
19061910
19071911
/*
19081912
--- src/timeline.c
+++ src/timeline.c
@@ -904,15 +904,16 @@
904 /*
905 ** Return a pointer to a constant string that forms the basis
906 ** for a timeline query for the WWW interface.
907 */
908 const char *timeline_query_for_www(void){
 
909 static const char zBaseSql[] =
910 @ SELECT
911 @ blob.rid AS blobRid,
912 @ uuid AS uuid,
913 @ datetime(event.mtime,'localtime') AS timestamp,
914 @ coalesce(ecomment, comment) AS comment,
915 @ coalesce(euser, user) AS user,
916 @ blob.rid IN leaf AS leaf,
917 @ bgcolor AS bgColor,
918 @ event.type AS eventType,
@@ -923,11 +924,14 @@
923 @ brief AS brief,
924 @ event.mtime AS mtime
925 @ FROM event CROSS JOIN blob
926 @ WHERE blob.rid=event.objid
927 ;
928 return zBaseSql;
 
 
 
929 }
930
931 /*
932 ** Generate a submenu element with a single parameter change.
933 */
@@ -1671,15 +1675,16 @@
1671 /*
1672 ** Return a pointer to a static string that forms the basis for
1673 ** a timeline query for display on a TTY.
1674 */
1675 const char *timeline_query_for_tty(void){
 
1676 static const char zBaseSql[] =
1677 @ SELECT
1678 @ blob.rid AS rid,
1679 @ uuid,
1680 @ datetime(event.mtime,'localtime') AS mDateTime,
1681 @ coalesce(ecomment,comment)
1682 @ || ' (user: ' || coalesce(euser,user,'?')
1683 @ || (SELECT case when length(x)>0 then ' tags: ' || x else '' end
1684 @ FROM (SELECT group_concat(substr(tagname,5), ', ') AS x
1685 @ FROM tag, tagxref
@@ -1696,11 +1701,14 @@
1696 @ AND tagxref.tagtype>0
1697 @ AND tagxref.rid=blob.rid
1698 @ WHERE blob.rid=event.objid
1699 @ AND tag.tagname='branch'
1700 ;
1701 return zBaseSql;
 
 
 
1702 }
1703
1704 /*
1705 ** Return true if the input string is a date in the ISO 8601 format:
1706 ** YYYY-MM-DD.
@@ -1876,32 +1884,28 @@
1876 print_timeline(&q, n, width, verboseFlag);
1877 db_finalize(&q);
1878 }
1879
1880 /*
1881 ** This is a version of the "localtime()" function from the standard
1882 ** C library. It converts a unix timestamp (seconds since 1970) into
1883 ** a broken-out local time structure.
1884 **
1885 ** This modified version of localtime() works like the library localtime()
1886 ** by default. Except if the timeline-utc property is set, this routine
1887 ** uses gmttime() instead. Thus by setting the timeline-utc property, we
1888 ** can get all localtimes to be displayed at UTC time.
1889 */
1890 struct tm *fossil_localtime(const time_t *clock){
1891 if( g.fTimeFormat==0 ){
1892 if( db_get_int("timeline-utc", 1) ){
1893 g.fTimeFormat = 1;
1894 }else{
1895 g.fTimeFormat = 2;
1896 }
1897 }
1898 if( clock==0 ) return 0;
1899 if( g.fTimeFormat==1 ){
1900 return gmtime(clock);
1901 }else{
1902 return localtime(clock);
1903 }
1904 }
1905
1906
1907 /*
1908
--- src/timeline.c
+++ src/timeline.c
@@ -904,15 +904,16 @@
904 /*
905 ** Return a pointer to a constant string that forms the basis
906 ** for a timeline query for the WWW interface.
907 */
908 const char *timeline_query_for_www(void){
909 static const char *zBase = 0;
910 static const char zBaseSql[] =
911 @ SELECT
912 @ blob.rid AS blobRid,
913 @ uuid AS uuid,
914 @ datetime(event.mtime%s) AS timestamp,
915 @ coalesce(ecomment, comment) AS comment,
916 @ coalesce(euser, user) AS user,
917 @ blob.rid IN leaf AS leaf,
918 @ bgcolor AS bgColor,
919 @ event.type AS eventType,
@@ -923,11 +924,14 @@
924 @ brief AS brief,
925 @ event.mtime AS mtime
926 @ FROM event CROSS JOIN blob
927 @ WHERE blob.rid=event.objid
928 ;
929 if( zBase==0 ){
930 zBase = mprintf(zBaseSql, timeline_utc());
931 }
932 return zBase;
933 }
934
935 /*
936 ** Generate a submenu element with a single parameter change.
937 */
@@ -1671,15 +1675,16 @@
1675 /*
1676 ** Return a pointer to a static string that forms the basis for
1677 ** a timeline query for display on a TTY.
1678 */
1679 const char *timeline_query_for_tty(void){
1680 static const char *zBase = 0;
1681 static const char zBaseSql[] =
1682 @ SELECT
1683 @ blob.rid AS rid,
1684 @ uuid,
1685 @ datetime(event.mtime%s) AS mDateTime,
1686 @ coalesce(ecomment,comment)
1687 @ || ' (user: ' || coalesce(euser,user,'?')
1688 @ || (SELECT case when length(x)>0 then ' tags: ' || x else '' end
1689 @ FROM (SELECT group_concat(substr(tagname,5), ', ') AS x
1690 @ FROM tag, tagxref
@@ -1696,11 +1701,14 @@
1701 @ AND tagxref.tagtype>0
1702 @ AND tagxref.rid=blob.rid
1703 @ WHERE blob.rid=event.objid
1704 @ AND tag.tagname='branch'
1705 ;
1706 if( zBase==0 ){
1707 zBase = mprintf(zBaseSql, timeline_utc());
1708 }
1709 return zBase;
1710 }
1711
1712 /*
1713 ** Return true if the input string is a date in the ISO 8601 format:
1714 ** YYYY-MM-DD.
@@ -1876,32 +1884,28 @@
1884 print_timeline(&q, n, width, verboseFlag);
1885 db_finalize(&q);
1886 }
1887
1888 /*
1889 ** Return one of two things:
1890 **
1891 ** ",'localtime'" if the timeline-utc property is set to 0.
1892 **
1893 ** "" (empty string) otherwise.
 
 
 
1894 */
1895 const char *timeline_utc(){
1896 if( g.fTimeFormat==0 ){
1897 if( db_get_int("timeline-utc", 1) ){
1898 g.fTimeFormat = 1;
1899 }else{
1900 g.fTimeFormat = 2;
1901 }
1902 }
 
1903 if( g.fTimeFormat==1 ){
1904 return "";
1905 }else{
1906 return ",'localtime'";
1907 }
1908 }
1909
1910
1911 /*
1912
+9 -8
--- src/tkt.c
+++ src/tkt.c
@@ -137,12 +137,13 @@
137137
const char *zName;
138138
Stmt q;
139139
int i, n, size, j;
140140
141141
zName = PD("name","-none-");
142
- db_prepare(&q, "SELECT datetime(tkt_mtime,'localtime') AS tkt_datetime, *"
143
- " FROM ticket WHERE tkt_uuid GLOB '%q*'", zName);
142
+ db_prepare(&q, "SELECT datetime(tkt_mtime%s) AS tkt_datetime, *"
143
+ " FROM ticket WHERE tkt_uuid GLOB '%q*'",
144
+ timeline_utc(), zName);
144145
if( db_step(&q)==SQLITE_ROW ){
145146
n = db_column_count(&q);
146147
for(i=0; i<n; i++){
147148
const char *zVal = db_column_text(&q, i);
148149
const char *zName = db_column_name(&q, i);
@@ -905,21 +906,21 @@
905906
@ No such ticket: %h(zUuid)
906907
style_footer();
907908
return;
908909
}
909910
db_prepare(&q,
910
- "SELECT datetime(mtime,'localtime'), objid, uuid, NULL, NULL, NULL"
911
+ "SELECT datetime(mtime%s), objid, uuid, NULL, NULL, NULL"
911912
" FROM event, blob"
912913
" WHERE objid IN (SELECT rid FROM tagxref WHERE tagid=%d)"
913914
" AND blob.rid=event.objid"
914915
" UNION "
915
- "SELECT datetime(mtime,'localtime'), attachid, uuid, src, filename, user"
916
+ "SELECT datetime(mtime%s), attachid, uuid, src, filename, user"
916917
" FROM attachment, blob"
917918
" WHERE target=(SELECT substr(tagname,5) FROM tag WHERE tagid=%d)"
918919
" AND blob.rid=attachid"
919920
" ORDER BY 1",
920
- tagid, tagid
921
+ timeline_utc(), tagid, timeline_utc(), tagid
921922
);
922923
while( db_step(&q)==SQLITE_ROW ){
923924
Manifest *pTicket;
924925
char zShort[12];
925926
const char *zDate = db_column_text(&q, 0);
@@ -1214,22 +1215,22 @@
12141215
zTktUuid);
12151216
if( tagid==0 ){
12161217
fossil_fatal("no such ticket %h", zTktUuid);
12171218
}
12181219
db_prepare(&q,
1219
- "SELECT datetime(mtime,'localtime'), objid, uuid, NULL, NULL, NULL"
1220
+ "SELECT datetime(mtime%s), objid, uuid, NULL, NULL, NULL"
12201221
" FROM event, blob"
12211222
" WHERE objid IN (SELECT rid FROM tagxref WHERE tagid=%d)"
12221223
" AND blob.rid=event.objid"
12231224
" UNION "
1224
- "SELECT datetime(mtime,'localtime'), attachid, uuid, src, "
1225
+ "SELECT datetime(mtime%s), attachid, uuid, src, "
12251226
" filename, user"
12261227
" FROM attachment, blob"
12271228
" WHERE target=(SELECT substr(tagname,5) FROM tag WHERE tagid=%d)"
12281229
" AND blob.rid=attachid"
12291230
" ORDER BY 1 DESC",
1230
- tagid, tagid
1231
+ timeline_utc(), tagid, timeline_utc(), tagid
12311232
);
12321233
while( db_step(&q)==SQLITE_ROW ){
12331234
Manifest *pTicket;
12341235
char zShort[12];
12351236
const char *zDate = db_column_text(&q, 0);
12361237
--- src/tkt.c
+++ src/tkt.c
@@ -137,12 +137,13 @@
137 const char *zName;
138 Stmt q;
139 int i, n, size, j;
140
141 zName = PD("name","-none-");
142 db_prepare(&q, "SELECT datetime(tkt_mtime,'localtime') AS tkt_datetime, *"
143 " FROM ticket WHERE tkt_uuid GLOB '%q*'", zName);
 
144 if( db_step(&q)==SQLITE_ROW ){
145 n = db_column_count(&q);
146 for(i=0; i<n; i++){
147 const char *zVal = db_column_text(&q, i);
148 const char *zName = db_column_name(&q, i);
@@ -905,21 +906,21 @@
905 @ No such ticket: %h(zUuid)
906 style_footer();
907 return;
908 }
909 db_prepare(&q,
910 "SELECT datetime(mtime,'localtime'), objid, uuid, NULL, NULL, NULL"
911 " FROM event, blob"
912 " WHERE objid IN (SELECT rid FROM tagxref WHERE tagid=%d)"
913 " AND blob.rid=event.objid"
914 " UNION "
915 "SELECT datetime(mtime,'localtime'), attachid, uuid, src, filename, user"
916 " FROM attachment, blob"
917 " WHERE target=(SELECT substr(tagname,5) FROM tag WHERE tagid=%d)"
918 " AND blob.rid=attachid"
919 " ORDER BY 1",
920 tagid, tagid
921 );
922 while( db_step(&q)==SQLITE_ROW ){
923 Manifest *pTicket;
924 char zShort[12];
925 const char *zDate = db_column_text(&q, 0);
@@ -1214,22 +1215,22 @@
1214 zTktUuid);
1215 if( tagid==0 ){
1216 fossil_fatal("no such ticket %h", zTktUuid);
1217 }
1218 db_prepare(&q,
1219 "SELECT datetime(mtime,'localtime'), objid, uuid, NULL, NULL, NULL"
1220 " FROM event, blob"
1221 " WHERE objid IN (SELECT rid FROM tagxref WHERE tagid=%d)"
1222 " AND blob.rid=event.objid"
1223 " UNION "
1224 "SELECT datetime(mtime,'localtime'), attachid, uuid, src, "
1225 " filename, user"
1226 " FROM attachment, blob"
1227 " WHERE target=(SELECT substr(tagname,5) FROM tag WHERE tagid=%d)"
1228 " AND blob.rid=attachid"
1229 " ORDER BY 1 DESC",
1230 tagid, tagid
1231 );
1232 while( db_step(&q)==SQLITE_ROW ){
1233 Manifest *pTicket;
1234 char zShort[12];
1235 const char *zDate = db_column_text(&q, 0);
1236
--- src/tkt.c
+++ src/tkt.c
@@ -137,12 +137,13 @@
137 const char *zName;
138 Stmt q;
139 int i, n, size, j;
140
141 zName = PD("name","-none-");
142 db_prepare(&q, "SELECT datetime(tkt_mtime%s) AS tkt_datetime, *"
143 " FROM ticket WHERE tkt_uuid GLOB '%q*'",
144 timeline_utc(), zName);
145 if( db_step(&q)==SQLITE_ROW ){
146 n = db_column_count(&q);
147 for(i=0; i<n; i++){
148 const char *zVal = db_column_text(&q, i);
149 const char *zName = db_column_name(&q, i);
@@ -905,21 +906,21 @@
906 @ No such ticket: %h(zUuid)
907 style_footer();
908 return;
909 }
910 db_prepare(&q,
911 "SELECT datetime(mtime%s), objid, uuid, NULL, NULL, NULL"
912 " FROM event, blob"
913 " WHERE objid IN (SELECT rid FROM tagxref WHERE tagid=%d)"
914 " AND blob.rid=event.objid"
915 " UNION "
916 "SELECT datetime(mtime%s), attachid, uuid, src, filename, user"
917 " FROM attachment, blob"
918 " WHERE target=(SELECT substr(tagname,5) FROM tag WHERE tagid=%d)"
919 " AND blob.rid=attachid"
920 " ORDER BY 1",
921 timeline_utc(), tagid, timeline_utc(), tagid
922 );
923 while( db_step(&q)==SQLITE_ROW ){
924 Manifest *pTicket;
925 char zShort[12];
926 const char *zDate = db_column_text(&q, 0);
@@ -1214,22 +1215,22 @@
1215 zTktUuid);
1216 if( tagid==0 ){
1217 fossil_fatal("no such ticket %h", zTktUuid);
1218 }
1219 db_prepare(&q,
1220 "SELECT datetime(mtime%s), objid, uuid, NULL, NULL, NULL"
1221 " FROM event, blob"
1222 " WHERE objid IN (SELECT rid FROM tagxref WHERE tagid=%d)"
1223 " AND blob.rid=event.objid"
1224 " UNION "
1225 "SELECT datetime(mtime%s), attachid, uuid, src, "
1226 " filename, user"
1227 " FROM attachment, blob"
1228 " WHERE target=(SELECT substr(tagname,5) FROM tag WHERE tagid=%d)"
1229 " AND blob.rid=attachid"
1230 " ORDER BY 1 DESC",
1231 timeline_utc(), tagid, timeline_utc(), tagid
1232 );
1233 while( db_step(&q)==SQLITE_ROW ){
1234 Manifest *pTicket;
1235 char zShort[12];
1236 const char *zDate = db_column_text(&q, 0);
1237
+3 -3
--- src/user.c
+++ src/user.c
@@ -450,13 +450,13 @@
450450
cgi_redirectf("%s/access_log?y=%d&n=%d", g.zTop, y, n);
451451
return;
452452
}
453453
style_header("Access Log");
454454
blob_zero(&sql);
455
- blob_append(&sql,
456
- "SELECT uname, ipaddr, datetime(mtime, 'localtime'), success"
457
- " FROM accesslog", -1
455
+ blob_appendf(&sql,
456
+ "SELECT uname, ipaddr, datetime(mtime%s), success"
457
+ " FROM accesslog", timeline_utc()
458458
);
459459
if( y==1 ){
460460
blob_append(&sql, " WHERE success", -1);
461461
}else if( y==2 ){
462462
blob_append(&sql, " WHERE NOT success", -1);
463463
--- src/user.c
+++ src/user.c
@@ -450,13 +450,13 @@
450 cgi_redirectf("%s/access_log?y=%d&n=%d", g.zTop, y, n);
451 return;
452 }
453 style_header("Access Log");
454 blob_zero(&sql);
455 blob_append(&sql,
456 "SELECT uname, ipaddr, datetime(mtime, 'localtime'), success"
457 " FROM accesslog", -1
458 );
459 if( y==1 ){
460 blob_append(&sql, " WHERE success", -1);
461 }else if( y==2 ){
462 blob_append(&sql, " WHERE NOT success", -1);
463
--- src/user.c
+++ src/user.c
@@ -450,13 +450,13 @@
450 cgi_redirectf("%s/access_log?y=%d&n=%d", g.zTop, y, n);
451 return;
452 }
453 style_header("Access Log");
454 blob_zero(&sql);
455 blob_appendf(&sql,
456 "SELECT uname, ipaddr, datetime(mtime%s), success"
457 " FROM accesslog", timeline_utc()
458 );
459 if( y==1 ){
460 blob_append(&sql, " WHERE success", -1);
461 }else if( y==2 ){
462 blob_append(&sql, " WHERE NOT success", -1);
463
--- win/Makefile.PellesCGMake
+++ win/Makefile.PellesCGMake
@@ -83,11 +83,11 @@
8383
8484
# define the sqlite files, which need special flags on compile
8585
SQLITESRC=sqlite3.c
8686
ORIGSQLITESRC=$(foreach sf,$(SQLITESRC),$(SRCDIR)$(sf))
8787
SQLITEOBJ=$(foreach sf,$(SQLITESRC),$(sf:.c=.obj))
88
-SQLITEDEFINES=-Dlocaltime=fossil_localtime -DSQLITE_OMIT_LOAD_EXTENSION=1 -DSQLITE_ENABLE_LOCKING_STYLE=0 -DSQLITE_THREADSAFE=0 -DSQLITE_DEFAULT_FILE_FORMAT=4 -DSQLITE_OMIT_DEPRECATED -DSQLITE_ENABLE_EXPLAIN_COMMENTS
88
+SQLITEDEFINES=-DSQLITE_OMIT_LOAD_EXTENSION=1 -DSQLITE_ENABLE_LOCKING_STYLE=0 -DSQLITE_THREADSAFE=0 -DSQLITE_DEFAULT_FILE_FORMAT=4 -DSQLITE_OMIT_DEPRECATED -DSQLITE_ENABLE_EXPLAIN_COMMENTS
8989
9090
# define the sqlite shell files, which need special flags on compile
9191
SQLITESHELLSRC=shell.c
9292
ORIGSQLITESHELLSRC=$(foreach sf,$(SQLITESHELLSRC),$(SRCDIR)$(sf))
9393
SQLITESHELLOBJ=$(foreach sf,$(SQLITESHELLSRC),$(sf:.c=.obj))
9494
--- win/Makefile.PellesCGMake
+++ win/Makefile.PellesCGMake
@@ -83,11 +83,11 @@
83
84 # define the sqlite files, which need special flags on compile
85 SQLITESRC=sqlite3.c
86 ORIGSQLITESRC=$(foreach sf,$(SQLITESRC),$(SRCDIR)$(sf))
87 SQLITEOBJ=$(foreach sf,$(SQLITESRC),$(sf:.c=.obj))
88 SQLITEDEFINES=-Dlocaltime=fossil_localtime -DSQLITE_OMIT_LOAD_EXTENSION=1 -DSQLITE_ENABLE_LOCKING_STYLE=0 -DSQLITE_THREADSAFE=0 -DSQLITE_DEFAULT_FILE_FORMAT=4 -DSQLITE_OMIT_DEPRECATED -DSQLITE_ENABLE_EXPLAIN_COMMENTS
89
90 # define the sqlite shell files, which need special flags on compile
91 SQLITESHELLSRC=shell.c
92 ORIGSQLITESHELLSRC=$(foreach sf,$(SQLITESHELLSRC),$(SRCDIR)$(sf))
93 SQLITESHELLOBJ=$(foreach sf,$(SQLITESHELLSRC),$(sf:.c=.obj))
94
--- win/Makefile.PellesCGMake
+++ win/Makefile.PellesCGMake
@@ -83,11 +83,11 @@
83
84 # define the sqlite files, which need special flags on compile
85 SQLITESRC=sqlite3.c
86 ORIGSQLITESRC=$(foreach sf,$(SQLITESRC),$(SRCDIR)$(sf))
87 SQLITEOBJ=$(foreach sf,$(SQLITESRC),$(sf:.c=.obj))
88 SQLITEDEFINES=-DSQLITE_OMIT_LOAD_EXTENSION=1 -DSQLITE_ENABLE_LOCKING_STYLE=0 -DSQLITE_THREADSAFE=0 -DSQLITE_DEFAULT_FILE_FORMAT=4 -DSQLITE_OMIT_DEPRECATED -DSQLITE_ENABLE_EXPLAIN_COMMENTS
89
90 # define the sqlite shell files, which need special flags on compile
91 SQLITESHELLSRC=shell.c
92 ORIGSQLITESHELLSRC=$(foreach sf,$(SQLITESHELLSRC),$(SRCDIR)$(sf))
93 SQLITESHELLOBJ=$(foreach sf,$(SQLITESHELLSRC),$(sf:.c=.obj))
94
--- win/Makefile.dmc
+++ win/Makefile.dmc
@@ -24,11 +24,11 @@
2424
CFLAGS = -o
2525
BCC = $(DMDIR)\bin\dmc $(CFLAGS)
2626
TCC = $(DMDIR)\bin\dmc $(CFLAGS) $(DMCDEF) $(SSL) $(INCL)
2727
LIBS = $(DMDIR)\extra\lib\ zlib wsock32 advapi32
2828
29
-SQLITE_OPTIONS = -Dlocaltime=fossil_localtime -DSQLITE_OMIT_LOAD_EXTENSION=1 -DSQLITE_ENABLE_LOCKING_STYLE=0 -DSQLITE_THREADSAFE=0 -DSQLITE_DEFAULT_FILE_FORMAT=4 -DSQLITE_OMIT_DEPRECATED -DSQLITE_ENABLE_EXPLAIN_COMMENTS
29
+SQLITE_OPTIONS = -DSQLITE_OMIT_LOAD_EXTENSION=1 -DSQLITE_ENABLE_LOCKING_STYLE=0 -DSQLITE_THREADSAFE=0 -DSQLITE_DEFAULT_FILE_FORMAT=4 -DSQLITE_OMIT_DEPRECATED -DSQLITE_ENABLE_EXPLAIN_COMMENTS
3030
3131
SHELL_OPTIONS = -Dmain=sqlite3_shell -DSQLITE_OMIT_LOAD_EXTENSION=1 -Dsqlite3_strglob=strglob -Dgetenv=fossil_getenv -Dfopen=fossil_fopen
3232
3333
SRC = add_.c allrepo_.c attach_.c bag_.c bisect_.c blob_.c branch_.c browse_.c captcha_.c cgi_.c checkin_.c checkout_.c clearsign_.c clone_.c comformat_.c configure_.c content_.c db_.c delta_.c deltacmd_.c descendants_.c diff_.c diffcmd_.c doc_.c encode_.c event_.c export_.c file_.c finfo_.c glob_.c graph_.c gzip_.c http_.c http_socket_.c http_ssl_.c http_transport_.c import_.c info_.c json_.c json_artifact_.c json_branch_.c json_config_.c json_diff_.c json_dir_.c json_finfo_.c json_login_.c json_query_.c json_report_.c json_status_.c json_tag_.c json_timeline_.c json_user_.c json_wiki_.c leaf_.c login_.c lookslike_.c main_.c manifest_.c markdown_.c markdown_html_.c md5_.c merge_.c merge3_.c moderate_.c name_.c path_.c pivot_.c popen_.c pqueue_.c printf_.c rebuild_.c regexp_.c report_.c rss_.c schema_.c search_.c setup_.c sha1_.c shun_.c skins_.c sqlcmd_.c stash_.c stat_.c style_.c sync_.c tag_.c tar_.c th_main_.c timeline_.c tkt_.c tktsetup_.c undo_.c unicode_.c update_.c url_.c user_.c utf8_.c util_.c verify_.c vfile_.c wiki_.c wikiformat_.c winfile_.c winhttp_.c wysiwyg_.c xfer_.c xfersetup_.c zip_.c
3434
3535
--- win/Makefile.dmc
+++ win/Makefile.dmc
@@ -24,11 +24,11 @@
24 CFLAGS = -o
25 BCC = $(DMDIR)\bin\dmc $(CFLAGS)
26 TCC = $(DMDIR)\bin\dmc $(CFLAGS) $(DMCDEF) $(SSL) $(INCL)
27 LIBS = $(DMDIR)\extra\lib\ zlib wsock32 advapi32
28
29 SQLITE_OPTIONS = -Dlocaltime=fossil_localtime -DSQLITE_OMIT_LOAD_EXTENSION=1 -DSQLITE_ENABLE_LOCKING_STYLE=0 -DSQLITE_THREADSAFE=0 -DSQLITE_DEFAULT_FILE_FORMAT=4 -DSQLITE_OMIT_DEPRECATED -DSQLITE_ENABLE_EXPLAIN_COMMENTS
30
31 SHELL_OPTIONS = -Dmain=sqlite3_shell -DSQLITE_OMIT_LOAD_EXTENSION=1 -Dsqlite3_strglob=strglob -Dgetenv=fossil_getenv -Dfopen=fossil_fopen
32
33 SRC = add_.c allrepo_.c attach_.c bag_.c bisect_.c blob_.c branch_.c browse_.c captcha_.c cgi_.c checkin_.c checkout_.c clearsign_.c clone_.c comformat_.c configure_.c content_.c db_.c delta_.c deltacmd_.c descendants_.c diff_.c diffcmd_.c doc_.c encode_.c event_.c export_.c file_.c finfo_.c glob_.c graph_.c gzip_.c http_.c http_socket_.c http_ssl_.c http_transport_.c import_.c info_.c json_.c json_artifact_.c json_branch_.c json_config_.c json_diff_.c json_dir_.c json_finfo_.c json_login_.c json_query_.c json_report_.c json_status_.c json_tag_.c json_timeline_.c json_user_.c json_wiki_.c leaf_.c login_.c lookslike_.c main_.c manifest_.c markdown_.c markdown_html_.c md5_.c merge_.c merge3_.c moderate_.c name_.c path_.c pivot_.c popen_.c pqueue_.c printf_.c rebuild_.c regexp_.c report_.c rss_.c schema_.c search_.c setup_.c sha1_.c shun_.c skins_.c sqlcmd_.c stash_.c stat_.c style_.c sync_.c tag_.c tar_.c th_main_.c timeline_.c tkt_.c tktsetup_.c undo_.c unicode_.c update_.c url_.c user_.c utf8_.c util_.c verify_.c vfile_.c wiki_.c wikiformat_.c winfile_.c winhttp_.c wysiwyg_.c xfer_.c xfersetup_.c zip_.c
34
35
--- win/Makefile.dmc
+++ win/Makefile.dmc
@@ -24,11 +24,11 @@
24 CFLAGS = -o
25 BCC = $(DMDIR)\bin\dmc $(CFLAGS)
26 TCC = $(DMDIR)\bin\dmc $(CFLAGS) $(DMCDEF) $(SSL) $(INCL)
27 LIBS = $(DMDIR)\extra\lib\ zlib wsock32 advapi32
28
29 SQLITE_OPTIONS = -DSQLITE_OMIT_LOAD_EXTENSION=1 -DSQLITE_ENABLE_LOCKING_STYLE=0 -DSQLITE_THREADSAFE=0 -DSQLITE_DEFAULT_FILE_FORMAT=4 -DSQLITE_OMIT_DEPRECATED -DSQLITE_ENABLE_EXPLAIN_COMMENTS
30
31 SHELL_OPTIONS = -Dmain=sqlite3_shell -DSQLITE_OMIT_LOAD_EXTENSION=1 -Dsqlite3_strglob=strglob -Dgetenv=fossil_getenv -Dfopen=fossil_fopen
32
33 SRC = add_.c allrepo_.c attach_.c bag_.c bisect_.c blob_.c branch_.c browse_.c captcha_.c cgi_.c checkin_.c checkout_.c clearsign_.c clone_.c comformat_.c configure_.c content_.c db_.c delta_.c deltacmd_.c descendants_.c diff_.c diffcmd_.c doc_.c encode_.c event_.c export_.c file_.c finfo_.c glob_.c graph_.c gzip_.c http_.c http_socket_.c http_ssl_.c http_transport_.c import_.c info_.c json_.c json_artifact_.c json_branch_.c json_config_.c json_diff_.c json_dir_.c json_finfo_.c json_login_.c json_query_.c json_report_.c json_status_.c json_tag_.c json_timeline_.c json_user_.c json_wiki_.c leaf_.c login_.c lookslike_.c main_.c manifest_.c markdown_.c markdown_html_.c md5_.c merge_.c merge3_.c moderate_.c name_.c path_.c pivot_.c popen_.c pqueue_.c printf_.c rebuild_.c regexp_.c report_.c rss_.c schema_.c search_.c setup_.c sha1_.c shun_.c skins_.c sqlcmd_.c stash_.c stat_.c style_.c sync_.c tag_.c tar_.c th_main_.c timeline_.c tkt_.c tktsetup_.c undo_.c unicode_.c update_.c url_.c user_.c utf8_.c util_.c verify_.c vfile_.c wiki_.c wikiformat_.c winfile_.c winhttp_.c wysiwyg_.c xfer_.c xfersetup_.c zip_.c
34
35
--- win/Makefile.mingw
+++ win/Makefile.mingw
@@ -1698,12 +1698,11 @@
16981698
$(OBJDIR)/zip.o: $(OBJDIR)/zip_.c $(OBJDIR)/zip.h $(SRCDIR)/config.h
16991699
$(XTCC) -o $(OBJDIR)/zip.o -c $(OBJDIR)/zip_.c
17001700
17011701
$(OBJDIR)/zip.h: $(OBJDIR)/headers
17021702
1703
-SQLITE_OPTIONS = -Dlocaltime=fossil_localtime \
1704
- -DSQLITE_OMIT_LOAD_EXTENSION=1 \
1703
+SQLITE_OPTIONS = -DSQLITE_OMIT_LOAD_EXTENSION=1 \
17051704
-DSQLITE_ENABLE_LOCKING_STYLE=0 \
17061705
-DSQLITE_THREADSAFE=0 \
17071706
-DSQLITE_DEFAULT_FILE_FORMAT=4 \
17081707
-DSQLITE_OMIT_DEPRECATED \
17091708
-DSQLITE_ENABLE_EXPLAIN_COMMENTS \
17101709
--- win/Makefile.mingw
+++ win/Makefile.mingw
@@ -1698,12 +1698,11 @@
1698 $(OBJDIR)/zip.o: $(OBJDIR)/zip_.c $(OBJDIR)/zip.h $(SRCDIR)/config.h
1699 $(XTCC) -o $(OBJDIR)/zip.o -c $(OBJDIR)/zip_.c
1700
1701 $(OBJDIR)/zip.h: $(OBJDIR)/headers
1702
1703 SQLITE_OPTIONS = -Dlocaltime=fossil_localtime \
1704 -DSQLITE_OMIT_LOAD_EXTENSION=1 \
1705 -DSQLITE_ENABLE_LOCKING_STYLE=0 \
1706 -DSQLITE_THREADSAFE=0 \
1707 -DSQLITE_DEFAULT_FILE_FORMAT=4 \
1708 -DSQLITE_OMIT_DEPRECATED \
1709 -DSQLITE_ENABLE_EXPLAIN_COMMENTS \
1710
--- win/Makefile.mingw
+++ win/Makefile.mingw
@@ -1698,12 +1698,11 @@
1698 $(OBJDIR)/zip.o: $(OBJDIR)/zip_.c $(OBJDIR)/zip.h $(SRCDIR)/config.h
1699 $(XTCC) -o $(OBJDIR)/zip.o -c $(OBJDIR)/zip_.c
1700
1701 $(OBJDIR)/zip.h: $(OBJDIR)/headers
1702
1703 SQLITE_OPTIONS = -DSQLITE_OMIT_LOAD_EXTENSION=1 \
 
1704 -DSQLITE_ENABLE_LOCKING_STYLE=0 \
1705 -DSQLITE_THREADSAFE=0 \
1706 -DSQLITE_DEFAULT_FILE_FORMAT=4 \
1707 -DSQLITE_OMIT_DEPRECATED \
1708 -DSQLITE_ENABLE_EXPLAIN_COMMENTS \
1709
--- win/Makefile.mingw.mistachkin
+++ win/Makefile.mingw.mistachkin
@@ -1698,12 +1698,11 @@
16981698
$(OBJDIR)/zip.o: $(OBJDIR)/zip_.c $(OBJDIR)/zip.h $(SRCDIR)/config.h
16991699
$(XTCC) -o $(OBJDIR)/zip.o -c $(OBJDIR)/zip_.c
17001700
17011701
$(OBJDIR)/zip.h: $(OBJDIR)/headers
17021702
1703
-SQLITE_OPTIONS = -Dlocaltime=fossil_localtime \
1704
- -DSQLITE_OMIT_LOAD_EXTENSION=1 \
1703
+SQLITE_OPTIONS = -DSQLITE_OMIT_LOAD_EXTENSION=1 \
17051704
-DSQLITE_ENABLE_LOCKING_STYLE=0 \
17061705
-DSQLITE_THREADSAFE=0 \
17071706
-DSQLITE_DEFAULT_FILE_FORMAT=4 \
17081707
-DSQLITE_OMIT_DEPRECATED \
17091708
-DSQLITE_ENABLE_EXPLAIN_COMMENTS \
17101709
--- win/Makefile.mingw.mistachkin
+++ win/Makefile.mingw.mistachkin
@@ -1698,12 +1698,11 @@
1698 $(OBJDIR)/zip.o: $(OBJDIR)/zip_.c $(OBJDIR)/zip.h $(SRCDIR)/config.h
1699 $(XTCC) -o $(OBJDIR)/zip.o -c $(OBJDIR)/zip_.c
1700
1701 $(OBJDIR)/zip.h: $(OBJDIR)/headers
1702
1703 SQLITE_OPTIONS = -Dlocaltime=fossil_localtime \
1704 -DSQLITE_OMIT_LOAD_EXTENSION=1 \
1705 -DSQLITE_ENABLE_LOCKING_STYLE=0 \
1706 -DSQLITE_THREADSAFE=0 \
1707 -DSQLITE_DEFAULT_FILE_FORMAT=4 \
1708 -DSQLITE_OMIT_DEPRECATED \
1709 -DSQLITE_ENABLE_EXPLAIN_COMMENTS \
1710
--- win/Makefile.mingw.mistachkin
+++ win/Makefile.mingw.mistachkin
@@ -1698,12 +1698,11 @@
1698 $(OBJDIR)/zip.o: $(OBJDIR)/zip_.c $(OBJDIR)/zip.h $(SRCDIR)/config.h
1699 $(XTCC) -o $(OBJDIR)/zip.o -c $(OBJDIR)/zip_.c
1700
1701 $(OBJDIR)/zip.h: $(OBJDIR)/headers
1702
1703 SQLITE_OPTIONS = -DSQLITE_OMIT_LOAD_EXTENSION=1 \
 
1704 -DSQLITE_ENABLE_LOCKING_STYLE=0 \
1705 -DSQLITE_THREADSAFE=0 \
1706 -DSQLITE_DEFAULT_FILE_FORMAT=4 \
1707 -DSQLITE_OMIT_DEPRECATED \
1708 -DSQLITE_ENABLE_EXPLAIN_COMMENTS \
1709
--- win/Makefile.msc
+++ win/Makefile.msc
@@ -65,12 +65,11 @@
6565
RCC = $(RCC) -DFOSSIL_ENABLE_SSL=1
6666
LIBS = $(LIBS) $(SSLLIB)
6767
LIBDIR = $(LIBDIR) -LIBPATH:$(SSLLIBDIR)
6868
!endif
6969
70
-SQLITE_OPTIONS = /Dlocaltime=fossil_localtime \
71
- /DSQLITE_OMIT_LOAD_EXTENSION=1 \
70
+SQLITE_OPTIONS = /DSQLITE_OMIT_LOAD_EXTENSION=1 \
7271
/DSQLITE_ENABLE_LOCKING_STYLE=0 \
7372
/DSQLITE_THREADSAFE=0 \
7473
/DSQLITE_DEFAULT_FILE_FORMAT=4 \
7574
/DSQLITE_OMIT_DEPRECATED \
7675
/DSQLITE_ENABLE_EXPLAIN_COMMENTS
7776
--- win/Makefile.msc
+++ win/Makefile.msc
@@ -65,12 +65,11 @@
65 RCC = $(RCC) -DFOSSIL_ENABLE_SSL=1
66 LIBS = $(LIBS) $(SSLLIB)
67 LIBDIR = $(LIBDIR) -LIBPATH:$(SSLLIBDIR)
68 !endif
69
70 SQLITE_OPTIONS = /Dlocaltime=fossil_localtime \
71 /DSQLITE_OMIT_LOAD_EXTENSION=1 \
72 /DSQLITE_ENABLE_LOCKING_STYLE=0 \
73 /DSQLITE_THREADSAFE=0 \
74 /DSQLITE_DEFAULT_FILE_FORMAT=4 \
75 /DSQLITE_OMIT_DEPRECATED \
76 /DSQLITE_ENABLE_EXPLAIN_COMMENTS
77
--- win/Makefile.msc
+++ win/Makefile.msc
@@ -65,12 +65,11 @@
65 RCC = $(RCC) -DFOSSIL_ENABLE_SSL=1
66 LIBS = $(LIBS) $(SSLLIB)
67 LIBDIR = $(LIBDIR) -LIBPATH:$(SSLLIBDIR)
68 !endif
69
70 SQLITE_OPTIONS = /DSQLITE_OMIT_LOAD_EXTENSION=1 \
 
71 /DSQLITE_ENABLE_LOCKING_STYLE=0 \
72 /DSQLITE_THREADSAFE=0 \
73 /DSQLITE_DEFAULT_FILE_FORMAT=4 \
74 /DSQLITE_OMIT_DEPRECATED \
75 /DSQLITE_ENABLE_EXPLAIN_COMMENTS
76
--- www/makefile.wiki
+++ www/makefile.wiki
@@ -203,21 +203,17 @@
203203
together in a final step.
204204
205205
Some files require special C-preprocessor macro definitions.
206206
When compiling sqlite.c, the following macros are recommended:
207207
208
- * -Dlocaltime=fossil_localtime
209208
* -DSQLITE_OMIT_LOAD_EXTENSION=1
210209
* -DSQLITE_ENABLE_LOCKING_STYLE=0
211210
* -DSQLITE_THREADSAFE=0
212211
* -DSQLITE_DEFAULT_FILE_FORMAT=4
213212
214
-The first and second symbol definitions above are required; the others
215
-are merely recommended. The "localtime()" library function in SQLite must
216
-be redefined to invoke fossil_localtime() instead. The fossil_localtime()
217
-routine will invoke either gmtime() or localtime() depending on the
218
-"Use UTC" setting for the fossil repository. Extension loading is omitted
213
+The first symbol definition above is required; the others
214
+are merely recommended. Extension loading is omitted
219215
as a security measure. Fossil is single-threaded so mutexing is disabled
220216
in SQLite as a performance enhancement.
221217
222218
When compiling the shell.c source file, these macros are required:
223219
224220
--- www/makefile.wiki
+++ www/makefile.wiki
@@ -203,21 +203,17 @@
203 together in a final step.
204
205 Some files require special C-preprocessor macro definitions.
206 When compiling sqlite.c, the following macros are recommended:
207
208 * -Dlocaltime=fossil_localtime
209 * -DSQLITE_OMIT_LOAD_EXTENSION=1
210 * -DSQLITE_ENABLE_LOCKING_STYLE=0
211 * -DSQLITE_THREADSAFE=0
212 * -DSQLITE_DEFAULT_FILE_FORMAT=4
213
214 The first and second symbol definitions above are required; the others
215 are merely recommended. The "localtime()" library function in SQLite must
216 be redefined to invoke fossil_localtime() instead. The fossil_localtime()
217 routine will invoke either gmtime() or localtime() depending on the
218 "Use UTC" setting for the fossil repository. Extension loading is omitted
219 as a security measure. Fossil is single-threaded so mutexing is disabled
220 in SQLite as a performance enhancement.
221
222 When compiling the shell.c source file, these macros are required:
223
224
--- www/makefile.wiki
+++ www/makefile.wiki
@@ -203,21 +203,17 @@
203 together in a final step.
204
205 Some files require special C-preprocessor macro definitions.
206 When compiling sqlite.c, the following macros are recommended:
207
 
208 * -DSQLITE_OMIT_LOAD_EXTENSION=1
209 * -DSQLITE_ENABLE_LOCKING_STYLE=0
210 * -DSQLITE_THREADSAFE=0
211 * -DSQLITE_DEFAULT_FILE_FORMAT=4
212
213 The first symbol definition above is required; the others
214 are merely recommended. Extension loading is omitted
 
 
 
215 as a security measure. Fossil is single-threaded so mutexing is disabled
216 in SQLite as a performance enhancement.
217
218 When compiling the shell.c source file, these macros are required:
219
220

Keyboard Shortcuts

Open search /
Next entry (timeline) j
Previous entry (timeline) k
Open focused entry Enter
Show this help ?
Toggle theme Top nav button