Date-time properties should be modeled as DateTimeOffset in C#
AutoRest currently generates properties of type DateTime? instead of DateTimeOffset?. This results in the loss of time zone information.
It looks like the place to fix this is in CSharpCodeNamer.NormalizePrimaryType.
@brjohnstmsft what is the use case for DateTimeOffset and having timezone information available?
@stankovski Data plane APIs like Azure Search that can store and retrieve date/time data with full time zone information. This saves clients from having to remember to normalize all DateTimes to UTC.
I agree that DateTimeOffset should be used by default. It can be important to retain the original timezone of the data and not convert everything to UTC. I'm willing to make the change. I guess the question would be is there a need to make the model type configurable?
@jhancock93 I would make it an option on C# code generator not to break existing clients