Skip to content

[Feature](mongodb-cdc) Add date.timezone option for MongoDB to Doris time conversion#674

Open
ziyanTOP wants to merge 1 commit into
apache:masterfrom
ziyanTOP:feature-mongodb-timezone
Open

[Feature](mongodb-cdc) Add date.timezone option for MongoDB to Doris time conversion#674
ziyanTOP wants to merge 1 commit into
apache:masterfrom
ziyanTOP:feature-mongodb-timezone

Conversation

@ziyanTOP
Copy link
Copy Markdown

Fixes #666

…time conversion

Introduces a new date.timezone configuration option (default UTC) for
mongodb-sync-database, allowing users to specify the target timezone when
converting MongoDB date/timestamp fields to Doris DATETIME.

Key changes:
1. Add DATE_TIMEZONE ConfigOption to MongoDBDatabaseSync.
2. Handle Debezium's default ISO 8601 string serialization for BSON Date
   (e.g. \"2024-06-04T08:03:37Z\") via Instant.parse() in formatSpecialFieldData().
3. Replace hardcoded Asia/Shanghai in MongoDateConverter with configurable
   timezone passed through JsonDebeziumChangeContext (Serializable).
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Feature](mongodb-cdc) Add date.timezone option for MongoDB to Doris time conversion

1 participant