Service Communications API Current Status returns wrong date

ぃ、小莉子 提交于 2019-12-11 04:13:24

问题


When you query the current status using the Service Communications API (e.g. https://manage.office.com/api/v1.0/{tenant-guid}/ServiceComms/CurrentStatus ), the StatusTime returned (which should be the current date/time) is always 24 hours out.

This is the current status (for EXO) returned for my tenant this morning:

{
            "FeatureStatus": [
                {
                    "FeatureDisplayName": "Sign-in",
                    "FeatureName": "Signin",
                    "FeatureServiceStatus": "ServiceOperational",
                    "FeatureServiceStatusDisplayName": "Normal service"
                },
                {
                    "FeatureDisplayName": "E-Mail and calendar access",
                    "FeatureName": "Access",
                    "FeatureServiceStatus": "ServiceDegradation",
                    "FeatureServiceStatusDisplayName": "Service degradation"
                },
                {
                    "FeatureDisplayName": "E-Mail timely delivery",
                    "FeatureName": "Delivery",
                    "FeatureServiceStatus": "ServiceOperational",
                    "FeatureServiceStatusDisplayName": "Normal service"
                },
                {
                    "FeatureDisplayName": "Management and Provisioning",
                    "FeatureName": "Provisioning",
                    "FeatureServiceStatus": "ServiceOperational",
                    "FeatureServiceStatusDisplayName": "Normal service"
                },
                {
                    "FeatureDisplayName": "Voice mail",
                    "FeatureName": "UnifiedMessaging",
                    "FeatureServiceStatus": "ServiceOperational",
                    "FeatureServiceStatusDisplayName": "Normal service"
                }
            ],
            "Id": "Exchange",
            "IncidentIds": [
                "EX151178"
            ],
            "Status": "ServiceDegradation",
            "StatusDisplayName": "Service degradation",
            "StatusTime": "2018-11-26T09:58:07.9107187Z",
            "Workload": "Exchange",
            "WorkloadDisplayName": "Exchange Online"
        }

As can be seen, the StatusTime shown is "2018-11-26T09:58:07.9107187Z". However, I made the request today, and the correct StatusTime should be "2018-11-27T09:58:07.9107187Z".

The time is always correct, the date is always 24 hours out.


回答1:


This Statustime is a DateTimeOffset. The DateTimeOffset represents a point in time, typically expressed as a date and time of day, relative to Coordinated Universal Time (UTC).

Although a DateTimeOffset value includes an offset, it is not a fully time zone-aware data structure. While an offset from UTC is one characteristic of a time zone, it does not unambiguously identify a time zone.

This post is also encountering the same problem as you, so I think this time is normal time, and there is no abnormality.

Please refer to the following links:

Office 365 Service Communications API reference (preview)



来源:https://stackoverflow.com/questions/53497553/service-communications-api-current-status-returns-wrong-date

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!