Fossil

Check-in [8c3bba8e97]
Login

Many hyperlinks are disabled.
Use anonymous login to enable hyperlinks.

Overview
Comment:Allow the "localtime" modifier on date/time functions within ticket report SQL statements. Ticket [bf4f5725f6c90fc2]
Downloads: Tarball | ZIP archive
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA1: 8c3bba8e97a29c0416a397f9524656596e98802f
User & Date: drh 2010-12-29 20:20:01.000
Context
2010-12-30
01:29
follow-up to [e22fca9640|Hex adjustment checkin]; an image -is- a binary file already - no need to display a "Hex" link for it explicitly (already done). ... (check-in: fab89453c5 user: bch tags: trunk)
2010-12-29
20:20
Allow the "localtime" modifier on date/time functions within ticket report SQL statements. Ticket [bf4f5725f6c90fc2] ... (check-in: 8c3bba8e97 user: drh tags: trunk)
2010-12-27
21:40
Add the test-clusters command to verify that all artifacts are reachable through cluster chains. Fix the cluster creator so that it does not create gaps if the number of unclustered entries exceeds 800. ... (check-in: 64a9c81a22 user: drh tags: trunk)
Changes
Unified Diff Ignore Whitespace Patch
Changes to src/report.c.
954
955
956
957
958
959
960

961
962
963
964
965
966
967
    }
    style_header(zTitle);
    output_color_key(zClrKey, 1, 
        "border=\"0\" cellpadding=\"3\" cellspacing=\"0\" class=\"report\"");
    @ <table border="1" cellpadding="2" cellspacing="0" class="report">
    sState.rn = rn;
    sState.nCount = 0;

    sqlite3_set_authorizer(g.db, report_query_authorizer, (void*)&zErr1);
    sqlite3_exec_readonly(g.db, zSql, generate_html, &sState, &zErr2);
    sqlite3_set_authorizer(g.db, 0, 0);
    @ </table>
    if( zErr1 ){
      @ <p class="reportError">Error: %h(zErr1)</p>
    }else if( zErr2 ){







>







954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
    }
    style_header(zTitle);
    output_color_key(zClrKey, 1, 
        "border=\"0\" cellpadding=\"3\" cellspacing=\"0\" class=\"report\"");
    @ <table border="1" cellpadding="2" cellspacing="0" class="report">
    sState.rn = rn;
    sState.nCount = 0;
    (void)fossil_localtime(0);  /* initialize the g.fTimeFormat variable */
    sqlite3_set_authorizer(g.db, report_query_authorizer, (void*)&zErr1);
    sqlite3_exec_readonly(g.db, zSql, generate_html, &sState, &zErr2);
    sqlite3_set_authorizer(g.db, 0, 0);
    @ </table>
    if( zErr1 ){
      @ <p class="reportError">Error: %h(zErr1)</p>
    }else if( zErr2 ){
Changes to src/timeline.c.
1245
1246
1247
1248
1249
1250
1251

1252
1253
1254
1255
1256
1257
  if( g.fTimeFormat==0 ){
    if( db_get_int("timeline-utc", 1) ){
      g.fTimeFormat = 1;
    }else{
      g.fTimeFormat = 2;
    }
  }

  if( g.fTimeFormat==1 ){
    return gmtime(clock);
  }else{
    return localtime(clock);
  }
}







>






1245
1246
1247
1248
1249
1250
1251
1252
1253
1254
1255
1256
1257
1258
  if( g.fTimeFormat==0 ){
    if( db_get_int("timeline-utc", 1) ){
      g.fTimeFormat = 1;
    }else{
      g.fTimeFormat = 2;
    }
  }
  if( clock==0 ) return 0;
  if( g.fTimeFormat==1 ){
    return gmtime(clock);
  }else{
    return localtime(clock);
  }
}