Time difference when importing CSV

Hello.
Thank you for your help.

I noticed something strange.
The default expression in creation date column contains the NOW () expression.

If you import the CSV in that state, the time 9 hours ago will be automatically entered in the column.
My current timezone is Tokyo, so I think it was automatically entered in UTC time.

Is there a way to automatically enter the local time?

Solved Solved
1 11 591
1 ACCEPTED SOLUTION

Thank you for your responses.

I updated my sample and test it, worked ideally.

https://www.youtube.com/watch?v=6SHiaMpJN5M

Hayato_Ito_0-1647596600084.png

I didn't know that the context ("host") returns "server". This teaching is very helpful for me!

I also thought it would be better if there was an explanation for this concept somewhere in the help.

https://help.appsheet.com/en/articles/5340448-import-a-csv-file-for-this-view
Example: This action is processed on the server side.

https://help.appsheet.com/en/articles/2357321-now
Example: According to the time zone of the execution host. See also Context function.

 

 

View solution in original post

11 REPLIES 11

Maybe check the locale setting of your view?

https://help.appsheet.com/en/articles/5340655-configuring-the-csv-locale

 

Thank you for your advice.
The CSV action setting is Japan.

Other points I confirmed are as follows.
- When new record manually add from AppSheet: Japan time
- Spreadsheet time zone: Japan

This problem is also occurring in my environment.

https://www.youtube.com/watch?v=NNaKKXqTLlo

It looks like the now () function is running in the AppSheet server timezone, not in the user's browser timezone.

I think it is a bug..

Please report this via your official channel. I am just a free plan user.

TeeSee1_0-1647586237557.png

 

This should not be a bug, but it tells how AppSheet import action is gonna work.

When we set the initial value to NOW(), then the expression is always evaluated at server side, event though import action is initiated from client side.

If you are sure your app is always used in Japan, please try the following expression as initial value.

 

if(Context(host)="Server",utcnow()+"009:00:00",now())

Both data entry through the form view and adding new row by impotrt csv action should return your local time. 

 

@takuya_miyai 

Thank you. @Koichi_Tsuji san for your clarification.

It would be nice to update the CSV import document to reflect this.

Obviously this affects not just Japanese users but almost everyone. (not sure where ALL the Appsheet servers are located and configured.)

 

EDITED:

Difficult to read all the fine printed notes..

TeeSee1_0-1647594445904.png

 

With JST, it looks like we will have to be careful even when importing date values before 9:00 AM.๐Ÿค”

 

Maybe, adding a duration to the datetime will calculate the date as well, so I thought it was okay.

 

Hayato_Ito_0-1647598166321.png

 

Tรดi sแปญ dแปฅng mysql vแบซn bแป‹ lแป‡ch giแป.

Help me!

Thank you for your responses.

I updated my sample and test it, worked ideally.

https://www.youtube.com/watch?v=6SHiaMpJN5M

Hayato_Ito_0-1647596600084.png

I didn't know that the context ("host") returns "server". This teaching is very helpful for me!

I also thought it would be better if there was an explanation for this concept somewhere in the help.

https://help.appsheet.com/en/articles/5340448-import-a-csv-file-for-this-view
Example: This action is processed on the server side.

https://help.appsheet.com/en/articles/2357321-now
Example: According to the time zone of the execution host. See also Context function.

 

 

Top Labels in this Space