@@ -127,6 +127,8 @@ pub struct SqlSerdeConfig {
127127 pub date_format : DateFormat ,
128128 /// `TIMESTAMP` format.
129129 pub timestamp_format : TimestampFormat ,
130+ /// `TIMESTAMP WITH TIME ZONE` format.
131+ pub timestamp_tz_format : TimestampFormat ,
130132 /// `DECIMAL` format.
131133 pub decimal_format : DecimalFormat ,
132134 /// `VARIANT` format
@@ -190,6 +192,7 @@ impl From<JsonFlavor> for SqlSerdeConfig {
190192 time_format : TimeFormat :: Millis ,
191193 date_format : DateFormat :: DaysSinceEpoch ,
192194 timestamp_format : TimestampFormat :: MillisSinceEpoch ,
195+ timestamp_tz_format : TimestampFormat :: MillisSinceEpoch ,
193196 decimal_format : DecimalFormat :: String ,
194197 variant_format : VariantFormat :: JsonString ,
195198 binary_format : BinaryFormat :: Array ,
@@ -198,7 +201,9 @@ impl From<JsonFlavor> for SqlSerdeConfig {
198201 JsonFlavor :: DebeziumMySql => Self {
199202 time_format : TimeFormat :: Micros ,
200203 date_format : DateFormat :: DaysSinceEpoch ,
204+ // Why is this missing fractions of second?
201205 timestamp_format : TimestampFormat :: String ( "%Y-%m-%dT%H:%M:%S%Z" ) ,
206+ timestamp_tz_format : TimestampFormat :: String ( "%Y-%m-%dT%H:%M:%S%Z" ) ,
202207 decimal_format : DecimalFormat :: String ,
203208 variant_format : VariantFormat :: JsonString ,
204209 binary_format : BinaryFormat :: Array ,
@@ -208,6 +213,7 @@ impl From<JsonFlavor> for SqlSerdeConfig {
208213 time_format : TimeFormat :: Micros ,
209214 date_format : DateFormat :: DaysSinceEpoch ,
210215 timestamp_format : TimestampFormat :: MillisSinceEpoch ,
216+ timestamp_tz_format : TimestampFormat :: MillisSinceEpoch ,
211217 decimal_format : DecimalFormat :: String ,
212218 variant_format : VariantFormat :: JsonString ,
213219 binary_format : BinaryFormat :: Array ,
@@ -217,6 +223,7 @@ impl From<JsonFlavor> for SqlSerdeConfig {
217223 time_format : TimeFormat :: String ( "%H:%M:%S%.f" ) ,
218224 date_format : DateFormat :: String ( "%Y-%m-%d" ) ,
219225 timestamp_format : TimestampFormat :: String ( "%Y-%m-%dT%H:%M:%S%.f%:z" ) ,
226+ timestamp_tz_format : TimestampFormat :: String ( "%Y-%m-%dT%H:%M:%S%.f%:z" ) ,
220227 decimal_format : DecimalFormat :: String ,
221228 variant_format : VariantFormat :: JsonString ,
222229 binary_format : BinaryFormat :: Array ,
@@ -226,6 +233,7 @@ impl From<JsonFlavor> for SqlSerdeConfig {
226233 time_format : TimeFormat :: String ( "%H:%M:%S%.f" ) ,
227234 date_format : DateFormat :: String ( "%Y-%m-%d" ) ,
228235 timestamp_format : TimestampFormat :: MillisSinceEpoch ,
236+ timestamp_tz_format : TimestampFormat :: MillisSinceEpoch ,
229237 decimal_format : DecimalFormat :: String ,
230238 variant_format : VariantFormat :: JsonString ,
231239 binary_format : BinaryFormat :: Array ,
@@ -239,6 +247,7 @@ impl From<JsonFlavor> for SqlSerdeConfig {
239247 time_format : TimeFormat :: Nanos ,
240248 date_format : DateFormat :: String ( "%Y-%m-%d" ) ,
241249 timestamp_format : TimestampFormat :: String ( "%Y-%m-%d %H:%M:%S.%f %:z" ) , // 2023-11-04 15:33:47.123 +00:00
250+ timestamp_tz_format : TimestampFormat :: String ( "%Y-%m-%d %H:%M:%S.%f %:z" ) , // 2023-11-04 15:33:47.123 +00:00
242251 decimal_format : DecimalFormat :: String ,
243252 variant_format : VariantFormat :: JsonString ,
244253 binary_format : BinaryFormat :: Base64 ,
@@ -251,6 +260,7 @@ impl From<JsonFlavor> for SqlSerdeConfig {
251260 time_format : TimeFormat :: default ( ) , // H-M-S
252261 date_format : DateFormat :: default ( ) , // Y-m-d
253262 timestamp_format : TimestampFormat :: default ( ) ,
263+ timestamp_tz_format : TimestampFormat :: default ( ) ,
254264 decimal_format : DecimalFormat :: String ,
255265 variant_format : VariantFormat :: Json ,
256266 // We need [`BinaryFormat::PgHex`] only because we serialize
0 commit comments