Skip to content
This repository was archived by the owner on May 24, 2024. It is now read-only.
This repository was archived by the owner on May 24, 2024. It is now read-only.

There was an error deserializing the object of type BingMapsRESTToolkit.Response. The string '1:00u' was not recognized as a valid DateTime. There is an unknown word starting at index '4' #72

@sndnnlfhvk

Description

@sndnnlfhvk

error

Response :

{
    "authenticationResultCode": "ValidCredentials",
    "brandLogoUri": "http:\/\/dev.virtualearth.net\/Branding\/logo_powered_by.png",
    "copyright": "Copyright © 2023 Microsoft and its suppliers. All rights reserved. This API cannot be accessed and the content and any results may not be used, reproduced or transmitted in any manner without express written permission from Microsoft Corporation.",
    "resourceSets": [
        {
            "estimatedTotal": 1,
            "resources": [
                {
                    "__type": "RESTTimeZone:http:\/\/schemas.microsoft.com\/search\/local\/ws\/rest\/v1",
                    "timeZone": {
                        "genericName": "Central European Standard Time",
                        "abbreviation": "CET",
                        "ianaTimeZoneId": "Europe\/Warsaw",
                        "windowsTimeZoneId": "Central European Standard Time",
                        "utcOffset": "1:00",
                        "convertedTime": {
                            "localTime": "2023-03-07T10:55:20",
                            "utcOffsetWithDst": "1:00",
                            "timeZoneDisplayName": "Central European Standard Time",
                            "timeZoneDisplayAbbr": "CET"
                        },
                        "dstRule": {
                            "dstStartMonth": "Mar",
                            "dstStartDateRule": "lastSun",
                            **"dstStartTime": "1:00u",**
                            "dstAdjust1": "1:00",
                            "dstEndMonth": "Oct",
                            "dstEndDateRule": "lastSun",
                            **"dstEndTime": "1:00u",**
                            "dstAdjust2": "0"
                        }
                    }
                }
            ]
        }
    ],
    "statusCode": 200,
    "statusDescription": "OK",
    "traceId": "60902ad665f54cc19b80d704d037a6cb|CO00004BD7|0.0.0.1"
}

from the json response ,we can see :

"dstStartTime": "1:00u"
"dstEndTime": "1:00u"

 /// <summary>
        /// The local time when DST starts, hh:mm format
        /// </summary>
        [DataMember(Name = "dstEndTime", EmitDefaultValue = false)]
        public string DstEndTime
        {
            get
            {
                return DateTimeHelper.GetUTCString(EndTime);
            }
            set
            {
                EndTime = DateTimeHelper.GetDateTimeFromUTCString(value);
            }
        }

dstStartTime and dstEndTime value "1:00u" is not a valid DateTime .

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions