I am working to retrieve today’s date within an API, but the resulting format does not match the one specified in my system settings. Is there a way to obtain the date that respects the system’s format settings, or alternatively, how can I read the system settings’s date format to apply it manually? like frappe.utills or something else
I am working exclusively with Frappe framework 15 and am not using ERPNext.
I am also using APIs not inside any controller methods.
from datetime import datetime
from frappe.utils import getdate
current_date = datetime.today().date()
print(current_date) # 2024-11-01
today_date = getdate()
print(today_date) # 2024-11-01