Sequelize timezone option vs application-level UTC conversion in a moleculer-db service
0 reputation · 14 Aug 2026, 18:04 UTC
I'm designing a Moleculer service that uses moleculer-db with the Sequelize adapter, and date handling across regions is the one decision I haven't settled. The service will run on multiple broker nodes, potentially on machines with different system time zones, and clients in several regions will read the stored timestamps.
Sequelize documents a global timezone option that stores dates in UTC and converts them to the configured zone on retrieval. The alternative is to leave that option unset and handle all conversion in application code, normalizing to UTC before writes and formatting per-request on reads. My concern is that the documented behavior notes the retrieval conversion depends on the driver or the database itself, and I haven't confirmed whether that is consistent across MySQL and PostgreSQL, both of which are candidates for this deployment.
Assume a recent Moleculer 0.14 and Sequelize 6 setup.
Given a multi-node cluster, is relying on Sequelize's timezone option sufficient to guarantee identical stored values on every node, or does the driver-dependent conversion make application-level UTC normalization the safer choice?
If I omit the option, does each node's local system time affect what gets written through the moleculer-db adapter?
What is the most practical way to verify the round-trip behavior against the actual production database before committing to either approach?