Copied to clipboard

Flag this post as spam?

This post will be reported to the moderators as potential spam to be looked at


  • Kristian Ravnevand 94 posts 214 karma points
    Jun 26, 2018 @ 12:57
    Kristian Ravnevand
    0

    Problem with releaseDate

    When setting releaseDate on my site on live environment on an Azure installation of Umbraco I get the following error (se attached image):

    Newtonsoft.Json.JsonReaderException: Could not convert string to DateTime: 2018-06-29 11.47.00. Path 'releaseDate', line 1, position 3765.
       at Newtonsoft.Json.JsonReader.ReadDateTimeString(String s)
       at Newtonsoft.Json.JsonTextReader.FinishReadQuotedStringValue(ReadType readType)
       at Newtonsoft.Json.JsonTextReader.ReadStringValue(ReadType readType)
       at Newtonsoft.Json.JsonTextReader.ReadAsDateTime()
       at Newtonsoft.Json.Serialization.JsonSerializerInternalReader.ReadForType(JsonReader reader, JsonContract contract, Boolean hasConverter)
       at Newtonsoft.Json.Serialization.JsonSerializerInternalReader.PopulateObject(Object newObject, JsonReader reader, JsonObjectContract contract, JsonProperty member, String id)
       at Newtonsoft.Json.Serialization.JsonSerializerInternalReader.CreateObject(JsonReader reader, Type objectType, JsonContract contract, JsonProperty member, JsonContainerContract containerContract, JsonProperty containerMember, Object existingValue)
       at Newtonsoft.Json.Serialization.JsonSerializerInternalReader.CreateValueInternal(JsonReader reader, Type objectType, JsonContract contract, JsonProperty member, JsonContainerContract containerContract, JsonProperty containerMember, Object existingValue)
       at Newtonsoft.Json.Serialization.JsonSerializerInternalReader.Deserialize(JsonReader reader, Type objectType, Boolean checkAdditionalContent)
       at Newtonsoft.Json.JsonSerializer.DeserializeInternal(JsonReader reader, Type objectType)
       at Newtonsoft.Json.JsonConvert.DeserializeObject(String value, Type type, JsonSerializerSettings settings)
       at Newtonsoft.Json.JsonConvert.DeserializeObject[T](String value, JsonSerializerSettings settings)
       at Newtonsoft.Json.JsonConvert.DeserializeObject[T](String value)
       at Umbraco.Web.WebApi.Binders.ContentItemBaseBinder`2.<GetModelAsync>d__7.MoveNext()
    

    The issue isn't on localhost, so it seems to have somthing to do with settings on Azure. Any idea how to fix this?

    enter image description here

  • Sonni T. 1 post 71 karma points
    Sep 14, 2022 @ 06:21
    Sonni T.
    0

    Hi Kristian

    I know it is an old thread so it may be a longshot...

    Do you remember what you did to fix this? I am experiencing the exact same behaviour in Umbraco 9.5.2. The only differeince is that i have the problem on my local solution and the staging/production environments.

    Maybe the fix can be used on U9 too (fingers crossed).

    Kind regards

    Sonni T.

  • Kristian Ravnevand 94 posts 214 karma points
    Sep 14, 2022 @ 13:02
    Kristian Ravnevand
    0

    Hi, don't quite remember. But I think the issue had to do with localization and that the server was on a different timezone than my local machine. Then dates set on my local machine and synced to the live environment gave the error. Another thing could be different timezone on the webbrowser than the server.

    That beeing said, I think Umbraco fixed this issue in a patch for Umbraco 7 some years ago :-D If you have a Umbraco Cloud installation you might try the Cloud chat :)

Please Sign in or register to post replies

Write your reply to:

Draft