Self-hosted Docker: Date Confusion

In comparing the time stamp of the system field UpdatedAt with the local time I see a 14 hour offset that I cannot explain. My server and client timezone is America/Denver which is seven (7) hours behind GMT, I believe. The date and time settings on the server and clients appears correct.

This question seems to be related to previous inquiries:

Visualisation in nocodb changes time use

How are timezone’s handled in ‘date-time’ field?

but from those I’m thinking I should see a seven hour offset in the displayed time, not 14.

Where am I going wrong?

Thanks for your assistance.

Also see:
Time & DateTime fields recorded with an offset [Mar 02]

In NocoDB, date and time stamps are generally stored in GMT & are displayed in browser timezone. Can you please confirm if you have tweaked browser timezone by any chance?

If by “tweaked” you mean the operating systems timezones are not all America/Denver (MST), they match.

I’ll do a test from another system and report back.

Thanks for the quick response.

Same result from another client - 14 hours offset. Otherwise all machines dates and times match. Also checked the local router and NTP server settings. All good.

Hi @HG2S thanks for reporting, please share following information so we will try to reproduce your issue:

  • Which database type are you using as NC_DB?
  • Does this happen for CreatedAt field as well?

I made two attempts at this. In the first I attempted to use an existing (co-located) MySQL server and, to answer your question, the NC_DB was:

NC_DB=“mysql2://localhost:3306?u=MYSQL_USER&p=MYSQL_PWD&d=nocodb”

things seemed to work, including the dates which all match to local time.

I then re-created the tables (made a new “Base”) and used the internal database. This too works, except for the dates. This occurred when entering a new record:

Screenshot 2024-11-23 at 11.37.15 AM

Note the creation day: 2024-11-20. I have to admit, this is the first I’ve seen this. All Creation Dates are on the 20th! Here’s a sample:

The last entry is today (23-Nov-24).
Adding a new record (internal database):

CreatedAt says: 2024-11-24 02:26
Local time is: 2024-11-23 12:26

Modifying the last record:

Screenshot 2024-11-23 at 12.38.28 PM

I think there might be several issues here but the 14 hours difference is what prompted the message. I should say that this is an evaluation and I am able and willing to tear this down and start over, clean, if necessary.

I should say in passing that this installation is based on the Docker image (latest) posted four (4) days ago.

UPDATE: I rebuilt the solution using a clean plain vanilla Docker install (meaning, no MySQL; default data source only) and things are tracking beautifully. I will shortly reintroduce the MySQL server and see how things work. Fingers crossed…

1 Like