Skip to main content

Notifications

Power Automate - Building Flows
Suggested answer

Timezone when update a SharePoint list item using API versus using Update Item action

Posted on by 1,372
Hi All,
 
I want to update a DateTime SharePoint column named "PreviousVersionModified", but i am a bit confused on the timezones.., now our site collection has this Regional settings:-
 
 
and when i tried to update the column using direct API call, as follow:-
 
 
 
where i am passing this inside the "FieldValue"  >> utcNow('MM/dd/yyyy HH:mm'),, where the datetime will not be added based on the UTC time zone but it will be added based on the site collection time zone, so when i pass the utcNow('MM/dd/yyyy HH:mm') .. the actual date inside the SharePoint back-end that got added will be UTC + 8 hours...
 
But if i update the same column using the SharePoint Update Item action:-
 
 
 
the datetime added at the SharePoint back-end will be in the correct UTC .. when i am talking about the SharePoint back-end , i mean the date/time column value when i retrieve it using API call
 
So, if i want to use API call approach, how i can tell SharePoint that the datetime i am passing should be added based on the UTC time zone and not based on the site collection timezone?
 
Thanks
  • Suggested answer
    EKarim Profile Picture
    EKarim 10,261 on at
    Timezone when update a SharePoint list item using API versus using Update Item action
    Please use the ISO 8601 format for all your dates, example: yyyy-MM-ddTHH:mm
     
    In this example:  2024-11-24T18:48:27Z -  the ‘Z’ suffix in this date-time string is used to indicate UTC (Coordinated Universal Time).
     
    For the date in the Update Item action, convert your local time to UTC using the convertToUtc function:
     
    convertToUtc('2024-11-24T12:00', 'Pacific Standard Time')
    2024-11-24T20:00:00.0000000Z

    Function Task
    convertToUtc Convert a timestamp from the source time zone to Universal Time Coordinated (UTC).
     
     
     
    Ellis
     

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

November 2024 Newsletter…

November 2024 Community Newsletter…

Community Update Oct 28…

Power Platform Community Update…

Tuesday Tip #7 Community Profile Tips…

Welcome to a brand new series, Tuesday Tips…

Leaderboard

#1
WarrenBelz Profile Picture

WarrenBelz 143,487

#2
RandyHayes Profile Picture

RandyHayes 76,308

#3
Pstork1 Profile Picture

Pstork1 64,014

Leaderboard