def execute():
	frappe.reload_doc("core", "doctype", "user")

	ss = frappe.get_doc("System Settings", "System Settings")
	if ss.time_zone in momentjs_data.get("links"):
		ss.time_zone = momentjs_data["links"][ss.time_zone]
		ss.flags.ignore_mandatory = True
		ss.save()

	for user, time_zone in frappe.db.sql("select name, time_zone from `tabUser` where ifnull(time_zone, '')!=''"):
		if time_zone in momentjs_data.get("links"):
			user = frappe.get_doc("User", user)
			user.time_zone = momentjs_data["links"][user.time_zone]
			user.save()
dataset/ETHPy150Open frappe/frappe/frappe/patches/v4_0/replace_deprecated_timezones.py/execute/original