[Core] Follow RFC 3339 datetime formatting for AzureJSONEncoder#20346
[Core] Follow RFC 3339 datetime formatting for AzureJSONEncoder#20346mccoyp merged 3 commits intoAzure:mainfrom
Conversation
| else: | ||
| iso_formatted = o.astimezone(TZ_UTC).isoformat() | ||
| # Replace the trailing "+00:00" UTC offset with "Z" (RFC 3339: https://www.ietf.org/rfc/rfc3339.txt) | ||
| return iso_formatted.replace("+00:00", "Z") |
There was a problem hiding this comment.
this is I think tangential to this specific PR, but I was looking into the msrest rfc serialization and we don't currently support that. Is this something I want to add?
msrest serialize rfc output:
serialize_rfc(isodate.parse_datetime("0001-01-01T00:00:00Z")) == 'Mon, 01 Jan 0001 00:00:00 GMT'azure.core.serialization
json.dumps(isodate.parse_datetime("0001-01-01T00:00:00Z"), cls=AzureJSONEncoder) == "0001-01-01T00:00:00Z"cc @lmazuel
There was a problem hiding this comment.
Just to clear, your question has indeed mothing to do with @mccoyp 's PR :p . But yes, we could think about having a RFC HTTP header format serializer (not same RFC than here)
There was a problem hiding this comment.
@mccoyp i'm totally wrong here please ignore me
|
/azp run python - autorest - pr |
|
Azure Pipelines successfully started running 1 pipeline(s). |
|
/azp run python - autorest - pr |
|
Azure Pipelines successfully started running 1 pipeline(s). |
|
/azp run python - autorest - pr |
|
Azure Pipelines successfully started running 1 pipeline(s). |
iscai-msft
left a comment
There was a problem hiding this comment.
lgtm, should probably wait for @annatisch to review though
…into update_lro_paging * 'main' of https://github.com/Azure/azure-sdk-for-python: [Core] Follow RFC 3339 datetime formatting for AzureJSONEncoder (Azure#20346) [Key Vault] Add 7.3-preview support for certificates (Azure#20477) Use dummy values and correct code rendering in README (Azure#20322) Use CredScan-suppressed dummy password in sample (Azure#20468) Fix type annotation in azure.storage.blob (Azure#20084) Adding static checks (Azure#20457) release_iseus_status_auto_reply (Azure#20441) Clarify LogsQueryClient query parameter description (Azure#20467) Sync eng/common directory with azure-sdk-tools for PR 1953 (Azure#20466) Skip eng common workflow enforcer for private repos (Azure#20462) remove iter_text and iter_lines (Azure#20460)
…into header_tuples * 'main' of https://github.com/Azure/azure-sdk-for-python: [Core] Follow RFC 3339 datetime formatting for AzureJSONEncoder (#20346)
Resolves #20190.