refactor: use renamed timezone utils (#34301)

refactor: use renamed timezone utils

https://github.com/frappe/frappe/pull/20253
(cherry picked from commit 502a37a864)

Co-authored-by: barredterra <14891507+barredterra@users.noreply.github.com>
Co-authored-by: Deepesh Garg <deepeshgarg6@gmail.com>
This commit is contained in:
mergify[bot]
2023-03-07 16:52:56 +05:30
committed by GitHub
parent 0e9f9c31a0
commit 164933aae8
3 changed files with 7 additions and 5 deletions

View File

@@ -10,6 +10,7 @@ import pytz
from frappe import _
from frappe.model.document import Document
from frappe.utils import cint
from frappe.utils.data import get_system_timezone
from pyyoutube import Api
@@ -64,7 +65,7 @@ def update_youtube_data():
frequency = get_frequency(frequency)
time = datetime.now()
timezone = pytz.timezone(frappe.utils.get_time_zone())
timezone = pytz.timezone(get_system_timezone())
site_time = time.astimezone(timezone)
if frequency == 30: