Skip to content
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.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@
# --------------------------------------------------------------------------

from uuid import uuid4
from datetime import datetime
from azure.core.tracing.decorator import distributed_trace
from azure.communication.sms._generated.models import (
SendMessageRequest,
Expand All @@ -15,7 +14,7 @@
from azure.communication.sms._models import SmsSendResult

from ._generated._azure_communication_sms_service import AzureCommunicationSMSService
from ._shared.utils import parse_connection_str, get_authentication_policy
from ._shared.utils import parse_connection_str, get_authentication_policy, get_current_utc_time
from ._version import SDK_MONIKER

class SmsClient(object):
Expand Down Expand Up @@ -113,7 +112,7 @@ def send(self, from_, # type: str
SmsRecipient(
to=p,
repeatability_request_id=str(uuid4()),
repeatability_first_sent=datetime.utcnow()
repeatability_first_sent=get_current_utc_time()
) for p in to
],
message=message,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@
# --------------------------------------------------------------------------

from uuid import uuid4
from datetime import datetime
from azure.core.tracing.decorator_async import distributed_trace_async
from azure.communication.sms._generated.models import (
SendMessageRequest,
Expand All @@ -15,7 +14,7 @@
from azure.communication.sms._models import SmsSendResult

from .._generated.aio._azure_communication_sms_service import AzureCommunicationSMSService
from .._shared.utils import parse_connection_str, get_authentication_policy
from .._shared.utils import parse_connection_str, get_authentication_policy, get_current_utc_time
from .._version import SDK_MONIKER

class SmsClient(object):
Expand Down Expand Up @@ -114,7 +113,7 @@ async def send(self, from_, # type: str
SmsRecipient(
to=p,
repeatability_request_id=str(uuid4()),
repeatability_first_sent=datetime.utcnow()
repeatability_first_sent=get_current_utc_time()
) for p in to
],
message=message,
Expand Down