You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
var now = DateTime.UtcNow;
var doc = new Dictionary<string, object> {
{ "begin", now }
};
// The following line resulted in {"begin":"2015-09-04T00:33:02.960719Z"}
var json = Manager.GetObjectMapper().WriteValueAsString(doc);
// Note that "now.ToString()" prints 9/4/2015 12:33:02 AM
I think what is going on here is that when you are putting the item into your list view, you are simply calling ToString() which results in the format you see in the screenshot (in other words, the default string representation of a DateTime object). You may also be using String.Format() or something that uses it internally. The DateTime object in question should be fully serialized back to a DateTime object and not a string anyway. Let me know a little more about this.
I am fairly sure that when I do this:
and then save, sync, and load the document, the string value of the "begin" field is something like
It should be formatted like this:
2012-04-23T18:25:43.511Z
The text was updated successfully, but these errors were encountered: