Skip to content

Timezone config not being respected. #301

Open
@belizariogr

Description

@belizariogr

Using the mariadb connector, if i query:

SELECT NOW();

It will be returning the time with timezone from the system. Even though I explicit set the timezone to UTC.

import mariadb from 'mariadb';
import Config from '../../config.js';

const connectionOptions ={
            host: Config.databaseHost || '127.0.0.1',
            port: Config.databasePort || '3306',
            user: Config.databaseUser || 'root',
            password: Config.databasePass || '',
            database: Config.databaseName,
            //dateStrings: true,
            connectionLimit: Config.databaseConnectionLimit || 250,
            multipleStatements: true,
            insertIdAsNumber: true,
            bigIntAsNumber: true,
            decimalAsNumber: true,
            timezone: 'Z'
        };
const pool = mariadb.createPool(connectionOptions);

Using the old mysql connector, everything works fine.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions