mirror of
https://github.com/GSA/notifications-api.git
synced 2026-01-31 23:26:23 -05:00
Rename method to get start and end date of a month for clarity
This commit is contained in:
@@ -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,
|
||||
|
||||
Reference in New Issue
Block a user