Datetime (now() ) writing the wrong time

I am not sure what is happening now, ive used this for a long time and when I test the simple formula I get the correct time

Tragertt_0-1738782534016.png

But when I run the automation it writes the wrong time to the table

Tragertt_1-1738782651709.png

which is 6:42 pm and 7 hours off. Any idea why it is off when it writes to the table?

Is the bot’s event time zone set appropriately?

2 Likes

BTW, DATETIME(NOW()) is redundant; just NOW() is sufficient.

2 Likes

first thing i checked. im just not sure why its 7 hours off

2 Likes

Unfortunately, it’s then time to contact AppSheet Support for help with this.

1 Like

So I tried something and got the same result. Instead of a bot to set the date time I made the default value for the field to datetime(now()) and it doing the same thing, off by 7 hours. Is there a locale for the entire program maybe?

Nope.

Is your data source locale and/or time zone set correctly?

How do I check that? I have seen on the bots the time zone setting but not for the app itself.

Maybe you have to define the location if its in a webhook. Eg. “Locale”: “nb-NO” (is for Norway)

See also here. https://support.google.com/appsheet/answer/10106702?hl=en&ref_topic=10102125&sjid=673024607828858213-EU

2 Likes

I checked the locale of the google sheet im using and it is set correctly. I changed the field default value to now() and checked the formula and I got this which is the correct time and date

Tragertt_0-1738858852548.png

and so I imported some records from the csv I downloaded and the time stamp of now() give this value

Tragertt_1-1738858946463.png

Still 8 hours off. I am not sure what is happening since I have used this formula and setup for a long time now and never had a problem. My time zone is GMT-08:00 Pacific time which is what time we are off but I am not sure why testing it gives the right time but when it is imported it gives the wrong time

1 Like

I have no other suggestions so I’m afraid I have to refer you to AppSheet Support for further help with this.

Attn @AleksiAlkio

1 Like

When you are importing data and the csv file doesn’t have any timestamp recorded, it writes the NOW() from the initial value as per UTC+0. That’s why there is 8 hours diffference.

4 Likes

@lizlynch , could you please update the CSV import docs to include how date and times are interpreted, per Aleksi’s comment above?

Import a CSV file for this view

Troubleshoot CSV Import

3 Likes

I’ve updated the documentation to indicate this.

When importing a CSV file, if the timezone is not specified then UTC+0 is used.

See also the note about the client timezone offset here:
https://support.google.com/appsheet/answer/10107326#date-time-expressions

Hope this helps!

2 Likes