Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

refactor!: remove deprecated timezone utils #20255

Merged
merged 2 commits into from
Mar 6, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
14 changes: 0 additions & 14 deletions frappe/utils/data.py
Original file line number Diff line number Diff line change
Expand Up @@ -329,13 +329,6 @@ def get_system_timezone():
return frappe.cache().get_value("time_zone", _get_system_timezone)


def get_time_zone():
deprecation_warning(
"`get_time_zone` is deprecated and will be removed in version 15. Use `get_system_timezone` instead."
)
return get_system_timezone()


def convert_utc_to_timezone(utc_timestamp, time_zone):
from pytz import UnknownTimeZoneError, timezone

Expand All @@ -356,13 +349,6 @@ def convert_utc_to_system_timezone(utc_timestamp):
return convert_utc_to_timezone(utc_timestamp, time_zone)


def convert_utc_to_user_timezone(utc_timestamp):
deprecation_warning(
"`convert_utc_to_user_timezone` is deprecated and will be removed in version 15. Use `convert_utc_to_system_timezone` instead."
)
return convert_utc_to_system_timezone(utc_timestamp)


def now() -> str:
"""return current datetime as yyyy-mm-dd hh:mm:ss"""
if frappe.flags.current_date:
Expand Down
2 changes: 0 additions & 2 deletions frappe/utils/safe_exec.py
Original file line number Diff line number Diff line change
Expand Up @@ -445,9 +445,7 @@ def add_module_properties(module, data, filter_method):
"now_datetime",
"get_timestamp",
"get_eta",
"get_time_zone",
"get_system_timezone",
"convert_utc_to_user_timezone",
"convert_utc_to_system_timezone",
"now",
"nowdate",
Expand Down