In a MVC controller
I have a class with a public DateTimeOffset? Prop1 {get;set;}
The class is instantiated by json that was passed from a controller method. So the value passed in is a string of ISO8601 format "YYYY-MM-DDThh:mm:ss+08:00".
For some reason the implicit conversion fails and returns null. I read somewhere that I have to use a "k custom formatter". How would i set that up as default for string->DateTimeOffset conversion?
Can i do it without explicitly calling TryParse?