Skip to content
Snippets Groups Projects
Commit 2b94b0ea authored by Nick Mathewson's avatar Nick Mathewson :game_die:
Browse files

Merge remote-tracking branch 'public/bug22245_024' into maint-0.2.9

parents f6ecda84 a6514b8a
No related branches found
No related tags found
No related merge requests found
o Minor bugfixes (bandwidth accounting):
- Roll over monthly accounting at the configured hour and minute,
rather than always at 00:00.
Fixes bug 22245; bugfix on 0.0.9rc1.
Found by Andrey Karpov with PVS-Studio.
......@@ -331,7 +331,7 @@ edge_of_accounting_period_containing(time_t now, int get_end)
case UNIT_MONTH: {
/* If this is before the Nth, we want the Nth of last month. */
if (tm.tm_mday < cfg_start_day ||
(tm.tm_mday < cfg_start_day && before)) {
(tm.tm_mday == cfg_start_day && before)) {
--tm.tm_mon;
}
/* Otherwise, the month is correct. */
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment