mirror of
https://github.com/GothenburgBitFactory/taskwarrior.git
synced 2025-06-26 10:54:26 +02:00
Revert "Recurrence: Converted from sprintf to std::to_string"
This reverts commit b4035d6ff5
.
This commit is contained in:
parent
def0223afa
commit
2c0bb1663d
1 changed files with 10 additions and 3 deletions
|
@ -97,14 +97,18 @@ void handleRecurrence ()
|
|||
rec.set ("uuid", uuid ()); // New UUID.
|
||||
rec.set ("parent", t.get ("uuid")); // Remember mom.
|
||||
rec.setAsNow ("entry"); // New entry date.
|
||||
rec.set ("due", std::to_string (d.toEpoch ()));
|
||||
|
||||
char dueDate[16];
|
||||
sprintf (dueDate, "%u", (unsigned int) d.toEpoch ());
|
||||
rec.set ("due", dueDate); // Store generated due date.
|
||||
|
||||
if (t.has ("wait"))
|
||||
{
|
||||
ISO8601d old_wait (t.get_date ("wait"));
|
||||
ISO8601d old_due (t.get_date ("due"));
|
||||
ISO8601d due (d);
|
||||
rec.set ("wait", std::to_string ((due + (old_wait - old_due)).toEpoch ()));
|
||||
sprintf (dueDate, "%u", (unsigned int) (due + (old_wait - old_due)).toEpoch ());
|
||||
rec.set ("wait", dueDate);
|
||||
rec.setStatus (Task::waiting);
|
||||
mask += 'W';
|
||||
}
|
||||
|
@ -114,7 +118,10 @@ void handleRecurrence ()
|
|||
rec.setStatus (Task::pending);
|
||||
}
|
||||
|
||||
rec.set ("imask", i);
|
||||
char indexMask[12];
|
||||
sprintf (indexMask, "%u", (unsigned int) i);
|
||||
rec.set ("imask", indexMask); // Store index into mask.
|
||||
|
||||
rec.remove ("mask"); // Remove the mask of the parent.
|
||||
|
||||
// Add the new task to the DB.
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue