Date field issues

Thanks for the reply Sunnyson. So I changed the timezone setting to: “utc-7”, “utc”, “America/Denver”, and just removed it.

module.exports = ({ env }) => ({
    defaultConnection: "default",
    connections: {
        default: {
            connector: "bookshelf",
            settings: {
                client: "sqlite",
                filename: env("DATABASE_FILENAME", ".tmp/data.db"),
                timezone: "America/Denver",
            },
            options: {
                useNullAsDefault: true,
            },
        },
    },
});

I also deleted the database each time. There was no change to the admin panel requests or responses, or REST responses.

I created a preferred-date-time object in the admin panel for each timezone setting. On each this data came from the create request:

{“date”:“2021-03-10T19:00:00.000Z”,“time”:“afternoon”}

I would expect this to be T17:00:00.000Z (or is it T-07:00:00.000Z). I live in utc-7 and my browser is set for utc-7.

The response from the api to the admin panel is always a day behind:

{“id”:1,“date”:“2021-03-09”,“time”:“afternoon”,“group”:null,“created_by”:…},“created_at”:“2021-02-16T15:26:13.585Z”,“updated_at”:“2021-02-16T15:26:13.593Z”}

Nothing changes for each timezone setting for REST requests either. What’s in the database is always correct though: 2021-03-10.

I do know that sqlite dbs default to utc. From what I’ve read Strapi also defaults to utc. Yet it sure seems like Strapi is adjusting dates.

Is there some configuration I’m missing and why is the timezone setting not changing anything?