How can we identify the timezone of date & time we are getting in MS Graph API response?

801 views Asked by At

I am getting the following response from MS Graph API while fetching all sections.

            (
                [id] => 0-92b00000!86-AAAAAAAAAAAF1FC8!132
                [self] => https://graph.microsoft.com/v1.0/users/testtt
                [createdDateTime] => 2021-03-19T09:37:35Z
                [title] => ABCDEF
                [createdByAppId] => 
                [contentUrl] => https://graph.microsoft.com/v1.0/users/aaaaa
                [lastModifiedDateTime] => 2021-03-19T09:37:49Z
                
            )

In the above part of response, I want to identify the timezone of the server or this "lastModifiedDateTime".

Advance thanks for your help.

1

There are 1 answers

0
Wander Nauta On

The "Z" suffix on the lastModifiedDateTime field means the timestamp is in UTC, or Coordinated Universal Time, sometimes called "Zulu".

The timestamp represents date and time information using ISO 8601 format and is always in UTC time. For example, midnight UTC on Jan 1, 2014 is 2014-01-01T00:00:00Z.

Reference