Salesforce Timezone

I have Appsheet connected to Salesforce.
The time entered in Appsheet and the time stored in Salesforce are different.
I believe this is a time zone setting issue.
Please let me know how to resolve this.

Both APPSHEET and Salesforce time zones are Japan Standard Time.

 

AppsheetAppsheetSalesforceSalesforce

Solved Solved
0 11 942
1 ACCEPTED SOLUTION

Hi @benzacover 

AppSheet will be adding with Local's Datetime, but Salesforce will be adding that Datetime as UTC time.
And probably your Salesfoce profile's Timezone is set to UTC+9, so it shows Datetime 9 hours later than AppSheet.

There are many possible solutions to this problem, but I think the easiest would be to create a formula entry on the Salesfoce side called "ๅ‡บ็™บๆ™‚ๅˆป(AppSheet)" and display the time 9 hours earlier.

View solution in original post

11 REPLIES 11

Which one is correct?

I forgot to mention something important.
Thanks for pointing it out to me.

The time in the Appsheet is correct.

I reproduced the issue with the current time.

 

Appsheet-Salesforce.png

Hi @benzacover 

AppSheet will be adding with Local's Datetime, but Salesforce will be adding that Datetime as UTC time.
And probably your Salesfoce profile's Timezone is set to UTC+9, so it shows Datetime 9 hours later than AppSheet.

There are many possible solutions to this problem, but I think the easiest would be to create a formula entry on the Salesfoce side called "ๅ‡บ็™บๆ™‚ๅˆป(AppSheet)" and display the time 9 hours earlier.

If Salesforce is simply the datasource and saving the time in UTC, then all should be good .... right?  AppSheet knows the DateTime is UTC and performs the proper translation to display the time in the app based on the set Locale.

Even if the DateTime was surfaced in some SalesForce side software, I would think it would be transformed in a similar way.

However, if you are retrieving the DateTime directly from SalesForce using some other tool, the tool you use may not perform the locale translation and you would need to implement it yourself.

On the other hand, if you were to transform the DateTime in the SalesForce table, you need to be sure you are apply the correct Timezone information or otherwise the AppSheet display will be wrong.

Hi @WillowMobileSys 

This problem is still caused by the immaturity of the integration between AppSheet and Salesforce.

AppSheet can add a Datetime in UTC, but then the UTC Datetime will be displayed on the AppSheet view.
So it appears that the AppSheet values are being entered directly into Salesforce.

On the other hand, the system column named Createddate in Salesforce is added in UTC no matter what the initial value is set to on the AppSheet side.

As you said, there is a way to unify UTC in Salesforce, which is the data source, and create VC for view on the AppSheet side.
It is up to each App Creator to decide which is the more important system, Salesforce or AppSheet, and depending on the number of users.

@WillowMobileSys 

As you point out, it doesn't matter as long as the time zone of the account used for the collaboration is taken into account.
However, as far as I can see in my environment, the time zone setting is currently ignored.๐Ÿ˜ข

I have created a feature request.
https://www.googlecloudcommunity.com/gc/Feature-Ideas/Reflect-the-time-zone-setting-in-Salesfoce-Acc...

I think there is a mis-understanding.

Changing Timezone in an external system should NOT affect the displayed DateTime in AppSheet when the Timezone stays consistently set - which in AppSheet is set by the locale.

Think of a DateTime value as a single moment in time around the globe.  Each geographic location has a representation of that EXACT SAME moment based on the understood Calendar Date and Time as represented by the acknowledged Timezone.

 

 

Thanks @WillowMobileSys 

What is AppSheet's locale setting and where is it located?

I understand that the Datetime format varies depending on Chrome's language settings, but I could not find a setting that affects Timezone.

Oh, maybe I understand.๐Ÿง
I guess the approach would be to use Usersetting to create a User timezone setting for each app.
That might be the most systematically correct response.

I think the main point I was trying to make was lost.  Based on the original post, the complaint was that the DateTime values between AppSheet and SalesForce did not match despite both being set to Japan Standard Time.  However, it was later suggested that SalesForce always saves the DateTime as UTC.  

If all the above is true, then my point is that SalesForce has the correct DateTime.  Japan/Tokyo Standard Time is 9 hours ahead of UTC and that is exactly what was being reflected in the screenshots of the original post.  Additionally, if SalesForce was storing an incorrect DateTime format, the DateTime in AppSheet would change upon the subsequent Sync.

Therefore, I am suggesting all is good in the original post.  There is no bug or issue and nothing more needs to be done.

If the different DateTime format in SalesForce is annoying, then one might check at SalesForce to see if there is some setting to save the DateTime as received rather than converting it to UTC.

Thanks! @takuya_miyai 
@WillowMobileSys 

I understand that this is a fundamental issue between Salesforce and Appsheet.
Thank you very much.

For the time being, I have tried to solve the problem in the following way.

On the Appsheet side, I created a column to be added or changed from Appsheet. (DepartureDatetime_Appsheet)
In contrast, on the Salesforce side, I created a column with a minus 9:00 calculation. (DepartureDatetime_Salesforce)

In a virtual column in Appsheet or a formula item in Salesforce, one of the columns on either the Appsheet or Salesforce side is input only and the other is reference only.

I do data entry on both the Appsheet side and the Salesforce side.
Therefore, I decided to use the Salesforce flow to update the values themselves, rather than the formula.

Appsheet-Salesforce_02.png

 

Top Labels in this Space