Commit bc56df3
The referenced commit introduced a bug:
printf "%(%Y-%m-%d)T\n" "now in 10 week"
printf "%(%Y-%m-%d)T\n" "in 10 weeks"
produce today's date.
As of this fix, they produce the date in ten weeks.
src/lib/libast/tm/tmxdate.c::1456
case TM_PARTS+4:
tm = tmxtm(tm, tmxtime(tm, zone), tm->tm_zone, 0);
tm->tm_hour += m * 7 * 24;
set |= DAY; // <======= BUG HERE
goto clear_hour;
The fix: since we are updating tm_hour, set HOUR, not DAY.
Resolves: #915
1 parent f99e786 commit bc56df3
2 files changed
+4
-1
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
4 | 4 | | |
5 | 5 | | |
6 | 6 | | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
7 | 10 | | |
8 | 11 | | |
9 | 12 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1453 | 1453 | | |
1454 | 1454 | | |
1455 | 1455 | | |
1456 | | - | |
| 1456 | + | |
1457 | 1457 | | |
1458 | 1458 | | |
1459 | 1459 | | |
| |||
0 commit comments