{"action":"created","issue":{"url":"https://api.github.com/repos/52projects/ccb-api-csharp/issues/18","repository_url":"https://api.github.com/repos/52projects/ccb-api-csharp","labels_url":"https://api.github.com/repos/52projects/ccb-api-csharp/issues/18/labels{/name}","comments_url":"https://api.github.com/repos/52projects/ccb-api-csharp/issues/18/comments","events_url":"https://api.github.com/repos/52projects/ccb-api-csharp/issues/18/events","html_url":"https://github.com/52projects/ccb-api-csharp/issues/18","id":271582849,"node_id":"MDU6SXNzdWUyNzE1ODI4NDk=","number":18,"title":"CCB returns invalid .Net DateTime value 0000-00-00","user":{"login":"bradbamford","id":4312940,"node_id":"MDQ6VXNlcjQzMTI5NDA=","avatar_url":"https://avatars1.githubusercontent.com/u/4312940?v=4","gravatar_id":"","url":"https://api.github.com/users/bradbamford","html_url":"https://github.com/bradbamford","followers_url":"https://api.github.com/users/bradbamford/followers","following_url":"https://api.github.com/users/bradbamford/following{/other_user}","gists_url":"https://api.github.com/users/bradbamford/gists{/gist_id}","starred_url":"https://api.github.com/users/bradbamford/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/bradbamford/subscriptions","organizations_url":"https://api.github.com/users/bradbamford/orgs","repos_url":"https://api.github.com/users/bradbamford/repos","events_url":"https://api.github.com/users/bradbamford/events{/privacy}","received_events_url":"https://api.github.com/users/bradbamford/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":0,"created_at":"2017-11-06T18:57:34Z","updated_at":"2018-10-07T21:18:53Z","closed_at":null,"author_association":"CONTRIBUTOR","body":"CCB uses mySQL in which  **0000-00-00 00:00:00** is a valid date in a date column.\r\nThis is not a valid .Net DateTime value and XML serialization like the one below will outright fail given this value.\r\n\r\n```csharp\r\n[XmlElement(\"modified\")]\r\npublic DateTime? Modified { get; set; }\r\n```\r\n\r\n**Option 1:**\r\nAdd string proxy properties, which works but is pretty ugly.\r\n```csharp\r\nprivate DateTime? _modified;\r\n\r\n[XmlIgnore]\r\npublic DateTime? Modified\r\n{\r\n  get { return _modified; }\r\n  set { _modified = value; }\r\n}\r\n\r\n[XmlElement(\"modified\")]\r\npublic string ModifiedString\r\n{\r\n  get\r\n  {\r\n    return _modified.HasValue \r\n      ? XmlConvert.ToString(_modified.Value, XmlDateTimeSerializationMode.Unspecified)\r\n      : string.Empty;\r\n  }\r\n  set\r\n  {\r\n    _modified = !string.IsNullOrEmpty(value) \r\n      ? XmlConvert.ToDateTime(value, XmlDateTimeSerializationMode.Unspecified) \r\n      : (DateTime?)null;\r\n  }\r\n}\r\n```\r\n\r\n**Option 2:**\r\nIs there is a way to extend the XmlElement attribute and check for invalid dates durning get and set?\r\nIf we could somehow check for this value and set it to NULL pre-serialization, that would solve the  issue across the entire project.  Would love additional eyes on this, thanks!"},"comment":{"url":"https://api.github.com/repos/52projects/ccb-api-csharp/issues/comments/427687916","html_url":"https://github.com/52projects/ccb-api-csharp/issues/18#issuecomment-427687916","issue_url":"https://api.github.com/repos/52projects/ccb-api-csharp/issues/18","id":427687916,"node_id":"MDEyOklzc3VlQ29tbWVudDQyNzY4NzkxNg==","user":{"login":"bradbamford","id":4312940,"node_id":"MDQ6VXNlcjQzMTI5NDA=","avatar_url":"https://avatars1.githubusercontent.com/u/4312940?v=4","gravatar_id":"","url":"https://api.github.com/users/bradbamford","html_url":"https://github.com/bradbamford","followers_url":"https://api.github.com/users/bradbamford/followers","following_url":"https://api.github.com/users/bradbamford/following{/other_user}","gists_url":"https://api.github.com/users/bradbamford/gists{/gist_id}","starred_url":"https://api.github.com/users/bradbamford/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/bradbamford/subscriptions","organizations_url":"https://api.github.com/users/bradbamford/orgs","repos_url":"https://api.github.com/users/bradbamford/repos","events_url":"https://api.github.com/users/bradbamford/events{/privacy}","received_events_url":"https://api.github.com/users/bradbamford/received_events","type":"User","site_admin":false},"created_at":"2018-10-07T21:18:53Z","updated_at":"2018-10-07T21:18:53Z","author_association":"CONTRIBUTOR","body":"@chadman any ideas?"}}
{"actor":{"display_login":"bradbamford"}}