Rename method to get start and end date of a month for clarity

This commit is contained in:
Imdad Ahad
2017-08-10 16:29:13 +01:00
parent 19b09f2a27
commit 782f3ea693
3 changed files with 13 additions and 13 deletions

View File

@@ -8,7 +8,7 @@ Create Date: 2017-07-12 13:35:45.636618
from datetime import datetime
from alembic import op
import sqlalchemy as sa
from app.dao.date_util import get_month_start_end_date
from app.dao.date_util import get_month_start_and_end_date_in_utc
down_revision = '0111_drop_old_service_flags'
revision = '0112_add_start_end_dates'
@@ -24,7 +24,7 @@ def upgrade():
results = conn.execute("Select id, month, year from monthly_billing")
res = results.fetchall()
for x in res:
start_date, end_date = get_month_start_end_date(
start_date, end_date = get_month_start_and_end_date_in_utc(
datetime(int(x.year), datetime.strptime(x.month, '%B').month, 1))
conn.execute("update monthly_billing set start_date = '{}', end_date = '{}' where id = '{}'".format(start_date,
end_date,