Fossil SCM
Backout [1aef260f4c0a0fc74f45f624eb0cbe92b98bf6e8|1aef260f4c]: "Honor timezones in imports from git", per ML thread
Commit
77f53423aec1d2ebe8d2912822224aef2d664215
Parent
25b2a809cd379c0…
2 files changed
-15
-1
-15
| --- src/import.c | ||
| +++ src/import.c | ||
| @@ -575,37 +575,22 @@ | ||
| 575 | 575 | fossil_free(gg.zMark); |
| 576 | 576 | gg.zMark = fossil_strdup(&zLine[5]); |
| 577 | 577 | }else |
| 578 | 578 | if( memcmp(zLine, "tagger ", 7)==0 || memcmp(zLine, "committer ",10)==0 ){ |
| 579 | 579 | sqlite3_int64 secSince1970; |
| 580 | - int hastz; | |
| 581 | - char tzdir; | |
| 582 | - int tz; | |
| 583 | 580 | for(i=0; zLine[i] && zLine[i]!='<'; i++){} |
| 584 | 581 | if( zLine[i]==0 ) goto malformed_line; |
| 585 | 582 | z = &zLine[i+1]; |
| 586 | 583 | for(i=i+1; zLine[i] && zLine[i]!='>'; i++){} |
| 587 | 584 | if( zLine[i]==0 ) goto malformed_line; |
| 588 | 585 | zLine[i] = 0; |
| 589 | 586 | fossil_free(gg.zUser); |
| 590 | 587 | gg.zUser = fossil_strdup(z); |
| 591 | 588 | secSince1970 = 0; |
| 592 | - | |
| 593 | - /* We don't use sscanf here because of int64 portability issues. */ | |
| 594 | 589 | for(i=i+2; fossil_isdigit(zLine[i]); i++){ |
| 595 | 590 | secSince1970 = secSince1970*10 + zLine[i] - '0'; |
| 596 | 591 | } |
| 597 | - | |
| 598 | - /* Read in optional timezone modifier (we don't know if it's strictly | |
| 599 | - * optional, but better to be sure). */ | |
| 600 | - tzdir = '+'; | |
| 601 | - tz = 0; | |
| 602 | - hastz = sscanf(&zLine[i], " %c%d", &tzdir, &tz); | |
| 603 | - if ((hastz == 1) || (hastz > 2)) goto malformed_line; | |
| 604 | - secSince1970 += ((tzdir == '-') ? -1 : 1) * | |
| 605 | - ((tz/100)*3600 + (tz%100)*60); | |
| 606 | - | |
| 607 | 592 | fossil_free(gg.zDate); |
| 608 | 593 | gg.zDate = db_text(0, "SELECT datetime(%lld, 'unixepoch')", secSince1970); |
| 609 | 594 | gg.zDate[10] = 'T'; |
| 610 | 595 | }else |
| 611 | 596 | if( memcmp(zLine, "from ", 5)==0 ){ |
| 612 | 597 |
| --- src/import.c | |
| +++ src/import.c | |
| @@ -575,37 +575,22 @@ | |
| 575 | fossil_free(gg.zMark); |
| 576 | gg.zMark = fossil_strdup(&zLine[5]); |
| 577 | }else |
| 578 | if( memcmp(zLine, "tagger ", 7)==0 || memcmp(zLine, "committer ",10)==0 ){ |
| 579 | sqlite3_int64 secSince1970; |
| 580 | int hastz; |
| 581 | char tzdir; |
| 582 | int tz; |
| 583 | for(i=0; zLine[i] && zLine[i]!='<'; i++){} |
| 584 | if( zLine[i]==0 ) goto malformed_line; |
| 585 | z = &zLine[i+1]; |
| 586 | for(i=i+1; zLine[i] && zLine[i]!='>'; i++){} |
| 587 | if( zLine[i]==0 ) goto malformed_line; |
| 588 | zLine[i] = 0; |
| 589 | fossil_free(gg.zUser); |
| 590 | gg.zUser = fossil_strdup(z); |
| 591 | secSince1970 = 0; |
| 592 | |
| 593 | /* We don't use sscanf here because of int64 portability issues. */ |
| 594 | for(i=i+2; fossil_isdigit(zLine[i]); i++){ |
| 595 | secSince1970 = secSince1970*10 + zLine[i] - '0'; |
| 596 | } |
| 597 | |
| 598 | /* Read in optional timezone modifier (we don't know if it's strictly |
| 599 | * optional, but better to be sure). */ |
| 600 | tzdir = '+'; |
| 601 | tz = 0; |
| 602 | hastz = sscanf(&zLine[i], " %c%d", &tzdir, &tz); |
| 603 | if ((hastz == 1) || (hastz > 2)) goto malformed_line; |
| 604 | secSince1970 += ((tzdir == '-') ? -1 : 1) * |
| 605 | ((tz/100)*3600 + (tz%100)*60); |
| 606 | |
| 607 | fossil_free(gg.zDate); |
| 608 | gg.zDate = db_text(0, "SELECT datetime(%lld, 'unixepoch')", secSince1970); |
| 609 | gg.zDate[10] = 'T'; |
| 610 | }else |
| 611 | if( memcmp(zLine, "from ", 5)==0 ){ |
| 612 |
| --- src/import.c | |
| +++ src/import.c | |
| @@ -575,37 +575,22 @@ | |
| 575 | fossil_free(gg.zMark); |
| 576 | gg.zMark = fossil_strdup(&zLine[5]); |
| 577 | }else |
| 578 | if( memcmp(zLine, "tagger ", 7)==0 || memcmp(zLine, "committer ",10)==0 ){ |
| 579 | sqlite3_int64 secSince1970; |
| 580 | for(i=0; zLine[i] && zLine[i]!='<'; i++){} |
| 581 | if( zLine[i]==0 ) goto malformed_line; |
| 582 | z = &zLine[i+1]; |
| 583 | for(i=i+1; zLine[i] && zLine[i]!='>'; i++){} |
| 584 | if( zLine[i]==0 ) goto malformed_line; |
| 585 | zLine[i] = 0; |
| 586 | fossil_free(gg.zUser); |
| 587 | gg.zUser = fossil_strdup(z); |
| 588 | secSince1970 = 0; |
| 589 | for(i=i+2; fossil_isdigit(zLine[i]); i++){ |
| 590 | secSince1970 = secSince1970*10 + zLine[i] - '0'; |
| 591 | } |
| 592 | fossil_free(gg.zDate); |
| 593 | gg.zDate = db_text(0, "SELECT datetime(%lld, 'unixepoch')", secSince1970); |
| 594 | gg.zDate[10] = 'T'; |
| 595 | }else |
| 596 | if( memcmp(zLine, "from ", 5)==0 ){ |
| 597 |
-1
| --- www/changes.wiki | ||
| +++ www/changes.wiki | ||
| @@ -4,11 +4,10 @@ | ||
| 4 | 4 | * Add the ability to display content, diffs and annotations for UTF16 |
| 5 | 5 | text files in the web interface. |
| 6 | 6 | * Add the "SaveAs..." and "Invert" buttons |
| 7 | 7 | to the graphical diff display that results |
| 8 | 8 | from using the --tk option with the [/help/diff | fossil diff] command. |
| 9 | - * Honor timezones in imports from git. | |
| 10 | 9 | * The [/reports] page now requires Read ("o") permissions. The "byweek" |
| 11 | 10 | report now properly propagates the selected year through the event type |
| 12 | 11 | filter links. |
| 13 | 12 | * The [/help/info | info command] now shows leaf status of the checkout. |
| 14 | 13 | * Add support for tunneling https through a http proxy (Ticket [e854101c4f]). |
| 15 | 14 |
| --- www/changes.wiki | |
| +++ www/changes.wiki | |
| @@ -4,11 +4,10 @@ | |
| 4 | * Add the ability to display content, diffs and annotations for UTF16 |
| 5 | text files in the web interface. |
| 6 | * Add the "SaveAs..." and "Invert" buttons |
| 7 | to the graphical diff display that results |
| 8 | from using the --tk option with the [/help/diff | fossil diff] command. |
| 9 | * Honor timezones in imports from git. |
| 10 | * The [/reports] page now requires Read ("o") permissions. The "byweek" |
| 11 | report now properly propagates the selected year through the event type |
| 12 | filter links. |
| 13 | * The [/help/info | info command] now shows leaf status of the checkout. |
| 14 | * Add support for tunneling https through a http proxy (Ticket [e854101c4f]). |
| 15 |
| --- www/changes.wiki | |
| +++ www/changes.wiki | |
| @@ -4,11 +4,10 @@ | |
| 4 | * Add the ability to display content, diffs and annotations for UTF16 |
| 5 | text files in the web interface. |
| 6 | * Add the "SaveAs..." and "Invert" buttons |
| 7 | to the graphical diff display that results |
| 8 | from using the --tk option with the [/help/diff | fossil diff] command. |
| 9 | * The [/reports] page now requires Read ("o") permissions. The "byweek" |
| 10 | report now properly propagates the selected year through the event type |
| 11 | filter links. |
| 12 | * The [/help/info | info command] now shows leaf status of the checkout. |
| 13 | * Add support for tunneling https through a http proxy (Ticket [e854101c4f]). |
| 14 |