Skip to content

Commit

Permalink
refactor: drop pytz
Browse files Browse the repository at this point in the history
Signed-off-by: Akhil Narang <[email protected]>
  • Loading branch information
akhilnarang committed Dec 9, 2024
1 parent 160b119 commit 05d931a
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions ecommerce_integrations/unicommerce/api_client.py
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
import base64
from typing import Any
from datetime import timezone

import frappe
import requests
from frappe import _
from frappe.utils import cint, cstr, get_datetime
from pytz import timezone

from ecommerce_integrations.unicommerce.constants import SETTINGS_DOCTYPE
from ecommerce_integrations.unicommerce.utils import create_unicommerce_log
Expand Down Expand Up @@ -460,7 +460,7 @@ def create_import_job(

def _utc_timeformat(datetime) -> str:
"""Get datetime in UTC/GMT as required by Unicommerce"""
return get_datetime(datetime).astimezone(timezone("UTC")).strftime("%Y-%m-%dT%H:%M:%SZ")
return get_datetime(datetime).astimezone(timezone.utc).strftime("%Y-%m-%dT%H:%M:%SZ")


def _safe_open_csv(csv_name):
Expand Down

0 comments on commit 05d931a

Please sign in to comment.