mirror of
https://github.com/GSA/notifications-admin.git
synced 2026-08-20 14:29:51 -04:00
notify-api-861 show eastern time
This commit is contained in:
@@ -3,9 +3,12 @@ from datetime import datetime
|
||||
import pytz
|
||||
from dateutil import parser
|
||||
|
||||
from app.utils.csv import get_user_preferred_timezone
|
||||
|
||||
|
||||
def get_current_financial_year():
|
||||
now = datetime.now(pytz.utc)
|
||||
et = pytz.timezone(get_user_preferred_timezone())
|
||||
now = datetime.now(et)
|
||||
current_month = int(now.strftime("%-m"))
|
||||
current_year = int(now.strftime("%Y"))
|
||||
return current_year if current_month > 9 else current_year - 1
|
||||
|
||||
Reference in New Issue
Block a user