Timezone Handling keeps defaulting to Driver Dependent when Connection Options are saved

Wappler Version: 6.0.1 Stable
Operating System: MacOS
Server Model: NodeJS
Database Type: MySQL
Hosting Type: Docker

Expected behavior

What do you think should happen?

When any modifications are made to the Connection Properties under Database Connection, the existing Timezone Handling option shouldn’t change from the already selected option.

Actual behavior

What actually happens?

I have setup Timezone Handling to UTC option but it gets changed to the Driver Dependent option.

How to reproduce

  1. Add Charset utf8mb4 under Database Connections and Save. Close the db.json tab.
  2. Click on the db again and select TZ Handling option as UTC and Save. Close the db tab.
  3. Open db again, remove Charset value and Save. Close the db tab.
  4. Open db again and the TZ Handling has changed to Driver Dependent. The option UTC needs to be selected again and saved.
1 Like

hi @guptast, i have the same problem, i defined on the user of connection (on SQL Admin) to use langague portuguese, but when a see a conecction through wappler (knex) they uses on english!

Timezone and UTC options are no longer per database connection but globally per docker target:

and server connect options:

image

tks @George, but this configuration i already have made, but still knex conecting on english, veja:

and tryed:

i finded this:

https://github.com/knex/knex/issues/97

const knex = require('knex')({
client: 'mssql',
connection: {
server: 'your_server',
user: 'your_username',
password: 'your_password',
database: 'your_database',
options: {
encrypt: true // Usado para conexões seguras
}
},
pool: {
afterCreate: (conn, done) => {
// Definir o idioma para Português
conn.query("SET LANGUAGE 'Português'", (err) => {
done(err, conn);
});
}
}
});

This could be works???

When was this change applied in the handling of Timezones? I always ensure that any changes to the TZ handling (the basis of my bug report) under DB connections are reverted to UTC (in my case) to avoid any mismatch with the Docker and Server Connect settings.

If the DB TZ handling settings are not being applied anywhere, then

  1. can this TZ handling setting be ignored?
  2. the setting should be removed from the DB Connection properties to avoid any further confusion with the other two settings.
  3. there's a chance to streamline the DB Connection properties panel by showing the Connection Properties directly in the 3rd panel instead of opening the connection properties in a pop-up window on the click of a button

Hi @AlexandreMoreira,

From this, I understand that you are trying to show datetime values in English or Portugues languages depending on some other login parameters. If that's the requirement, then you will need the language_code such as en-US (English US) or pt-PT (Portuguese Portugal) and a custom formatter (Client side) to convert a date to the desired datetime format.

Actually the timezone settings were removed from the UI for Database Connections in NodeJS already in October 2022, see under 'Database Connector" : Wappler 5.2.2 Released

Are you seeing them somewhere else or are you using a very old Wappler version?

Hi George,

I'm seeing them under Globals -> db connection properties. This screenshot is from a NodeJS project on the latest v6.7.2.

Tjs @guptast, but not! I need to return in correctly language the return of sql server exception messages. And nothing of this tips of configuration still works!

see the both language connections, through console sql and knex wappler. using the same login_name! When comes from knex! Always english!!

Can anyone help me? I need to retrieve exception messages from the SQL Server database in another language and when investigating the connection that Knex makes, it is always in English as illustrated above! I've already tried all the suggested settings! Thanks in advance for any suggestions! thanks.

connection by KNEX:

using console of SQL Server and the SAME user "wappleradm" its works fine!

Hi @AlexandreMoreira,

Personally, I haven't had a need to return exception messages in different languages. I have found this article explaining how to setup languages at different levels of MSSQL Server.

Setting & working with language in SQL SERVER - TekTutorialsHub

I would also suggest starting a new separate thread outlining your specific requirements and your current setup, so any Wappler user who has an experience in this area can assist you.

tks, but the trouble not is the configuration on SQL Server, this is ok and works fine when conect others ways, only on Wapper that dont respect de configuration on user sql defined. but thanks, i will open other ticket.

1 Like