cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Highlighted
Moritz_Huber
Level: Powered On

Current DateTime and convert DateTime

EDIT:

2019-08-21 09_58_44-Edit your flow _ Microsoft Flow.png

 

When i insert the correct conversion settings (according to my understanding) the source time should be 08:15

and the converted time shuold be 10:15

 

the times it really inserts into sharepoint list is utc = 21:17 and converted time 20:17

how the hack does that make sense? is it just twisted?

 

Why do i always get some kind of random datetime with the "Current time" and "Convert time zone" Actions?

 

2019-08-21 07_41_37-Edit your flow _ Microsoft Flow.png

 

For Example. The time at my location is actually 07:44 the time flow is writing into Sharepoint-List is 22:45 the day before. To my understanding the current time action should output the utc time which shuld be 0 and then my local timezone would be +1

 

This is very confusing. hope someone can clarify this

 

thank you in advance

11 REPLIES 11
Dual Super User
Dual Super User

Re: Current DateTime and convert DateTime

Hi @Moritz_Huber 

 

The current time action returns the current time in the UTC time zone. Therefore, in the convert time action, you need to specify the source time zone as UTC:asds.PNG

Hope this Helps!

 

If this reply has answered your question or solved your issue, please mark this question as answered. Answered questions helps users in the future who may have the same issue or question quickly find a resolution via search. If you liked my response, please consider giving it a thumbs up. THANKS!

Moritz_Huber
Level: Powered On

Re: Current DateTime and convert DateTime

@yashag2255 

 

thank you for your reply. unfortunately there is no impact if i change the source time zone! i can set it to +1, +10, -5 the output is always the same and is not utc anyway.

 

second information if i change the output to +14 it is almost the time it needs to be but i can't got further. anyway this would be a very ugly hack.

 

why is the currentTime from Flows not the same as the utc time on google?

Dual Super User
Dual Super User

Re: Current DateTime and convert DateTime

Hi @Moritz_Huber 

 

Can you try again? I just checked and it kinda works fine for me: dd.PNG

 

The get current time gets the UTC time and then the convert time converts it appropriately to my timezone..

 

Hope this Helps!

 

If this reply has answered your question or solved your issue, please mark this question as answered. Answered questions helps users in the future who may have the same issue or question quickly find a resolution via search. If you liked my response, please consider giving it a thumbs up. THANKS!

Moritz_Huber
Level: Powered On

Re: Current DateTime and convert DateTime

2019-08-21 10_31_37-Run History _ Microsoft Flow.png

there the problem relies, i'll try to code it to the right way

Dual Super User
Dual Super User

Re: Current DateTime and convert DateTime

Hi @Moritz_Huber 

 

So i can see that in your screenshot, you are getting the base time as UTC correct. There is an issue with source time zone though. Did you make the update to the source time zone ? It should be UTC as shown in my previous response. 

 

Hope this Helps!

 

If this reply has answered your question or solved your issue, please mark this question as answered. Answered questions helps users in the future who may have the same issue or question quickly find a resolution via search. If you liked my response, please consider giving it a thumbs up. THANKS!

Moritz_Huber
Level: Powered On

Re: Current DateTime and convert DateTime

How can i change that?

Dual Super User
Dual Super User

Re: Current DateTime and convert DateTime

Hi @Moritz_Huber 

 

Please refer to the screenshot below:


@yashag2255 wrote:

Hi @Moritz_Huber 

 

The current time action returns the current time in the UTC time zone. Therefore, in the convert time action, you need to specify the source time zone as UTC:asds.PNG

Hope this Helps!

 

If this reply has answered your question or solved your issue, please mark this question as answered. Answered questions helps users in the future who may have the same issue or question quickly find a resolution via search. If you liked my response, please consider giving it a thumbs up. THANKS!


In your flow, you need to alter the convert time action. 

 

Hope this Helps!

 

If this reply has answered your question or solved your issue, please mark this question as answered. Answered questions helps users in the future who may have the same issue or question quickly find a resolution via search. If you liked my response, please consider giving it a thumbs up. THANKS!

Moritz_Huber
Level: Powered On

Re: Current DateTime and convert DateTime

Actually the ms flow is doing it's work until it tries to update the sharepoint list element. the times in the flow-testrun are correct. if i have 11:14 in flows it updates the list object in sharepoint to 04:14.

 

why is that?

Dual Super User
Dual Super User

Re: Current DateTime and convert DateTime

Hi @Moritz_Huber 

 

Can you check the regional settings of your SharePoint list? When date time is patched to a list, it converts the time to the specific timezone by itself. Please check if this has something to do with the SharePoint list time zone.
 
Hope this Helps!

If this reply has answered your question or solved your issue, please mark this question as answered. Answered questions helps users in the future who may have the same issue or question quickly find a resolution via search. If you liked my response, please consider giving it a thumbs up. THANKS!
Moritz_Huber
Level: Powered On

Re: Current DateTime and convert DateTime

changed the language and the country-zone. However couldn't find the setting-link to see the current set timezone. Anyway this should work on company level not only on my local machine. what is best-practice for save date and times so everyone is talking about the same?

Dual Super User
Dual Super User

Re: Current DateTime and convert DateTime

Hey @Moritz_Huber 

 

This goes like, suppose your current timezone is IST and the sharepoint timezone is set to UTC. When you submit a date/time based on current location, this will get converted to utc by default and gets saved to utc. If you apply some conversion over it, lets say convert this to utc before passing this as an input, this will apply the conversion twice, once based on your intervention, other by SharePoint.
 
This SharePoint side conversion is for the view purpose only, if you change the regional setting to current timezone, this will return the value whatever is posted by the user.
 
 
Hope this Helps!
 
If this reply has answered your question or solved your issue, please mark this question as answered. Answered questions helps users in the future who may have the same issue or question quickly find a resolution via search. If you liked my response, please consider giving it a thumbs up. THANKS!

Helpful resources

Announcements
firstImage

Power Platform Online Conference

Speakers, submit your sessions now! Call for speakers ends Feb. 10!

firstImage

New & Improved Power Automate Community Cookbook

We've updated and improved the layout and uploading format of the Power Automate Cookbook!

thirdimage

Power Automate Community User Group Member Badge

Fill out a quick form to claim your user group badge now!

firstImage

Incoming: New and improved badges!

We've given our badges an overhaul and also added some brand new ones!

fifthimage

Microsoft Learn

Learn how to build the business apps that you need.

sixthImage

Power Platform World Tour

Find out where you can attend!

seventhimage

Webinars & Video Gallery

Watch & learn from the Power Automate Community Video Gallery!

Top Solution Authors
Top Kudoed Authors (Last 30 Days)
Users online (5,750)