I was reading this MSDocs article about DateTime-related format support https://learn.microsoft.com/en-us/dotnet/standard/datetime/system-text-json-support#support-for-the-iso-8601-12019-format
And I was trying to cast datetime to string with this format without colon in the timezone part:
2021-01-01T14:30:10+0030
I want to cast this datetimeoffset to string. I use this format:
yyyy-MM-ddTHH:mm:sszzz
But the output of the ToString("yyyy-MM-ddTHH:mm:sszzz") method is:
2021-01-01T14:30:10+00:30
It has colon (:) sign in timezone part. How can I cast it like '2021-01-01T14:30:10+0030'? (without colon in the timezone part)
Can I format the timezone part?