Skip to content

Commit

Permalink
Rename TimezoneOffsetFormat.
Browse files Browse the repository at this point in the history
  • Loading branch information
Tang8330 committed Oct 16, 2024
1 parent 9c48682 commit 702d5de
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion lib/optimization/table_data.go
Original file line number Diff line number Diff line change
Expand Up @@ -296,7 +296,7 @@ func (t *TableData) MergeColumnsFromDestination(destCols ...columns.Column) erro
// If the column in the destination is a timestamp_tz and the in-memory column is a timestamp_ntz, we should update the layout to contain timezone locale.
if foundColumn.KindDetails.ExtendedTimeDetails.Type == ext.TimestampTzKindType && inMemoryCol.KindDetails.ExtendedTimeDetails.Type == ext.TimestampNTZKindType {
if inMemoryCol.KindDetails.ExtendedTimeDetails.Format != "" {
inMemoryCol.KindDetails.ExtendedTimeDetails.Format += ext.TimezoneOffset
inMemoryCol.KindDetails.ExtendedTimeDetails.Format += ext.TimezoneOffsetFormat
}
}

Expand Down
8 changes: 4 additions & 4 deletions lib/typing/ext/variables.go
Original file line number Diff line number Diff line change
Expand Up @@ -44,17 +44,17 @@ var SupportedTimeFormats = []string{
AdditionalTimeFormat,
}

const TimezoneOffset = "Z07:00"
const TimezoneOffsetFormat = "Z07:00"

// RFC3339 variants
const (
RFC3339MillisecondUTC = "2006-01-02T15:04:05.000Z"
RFC3339MicrosecondUTC = "2006-01-02T15:04:05.000000Z"
RFC3339NanosecondUTC = "2006-01-02T15:04:05.000000000Z"
RFC3339Millisecond = "2006-01-02T15:04:05.000" + TimezoneOffset
RFC3339Millisecond = "2006-01-02T15:04:05.000" + TimezoneOffsetFormat
RFC3339MillisecondNoTZ = "2006-01-02T15:04:05.000"
RFC3339Microsecond = "2006-01-02T15:04:05.000000" + TimezoneOffset
RFC3339Microsecond = "2006-01-02T15:04:05.000000" + TimezoneOffsetFormat
RFC3339MicrosecondNoTZ = "2006-01-02T15:04:05.000000"
RFC3339Nanosecond = "2006-01-02T15:04:05.000000000" + TimezoneOffset
RFC3339Nanosecond = "2006-01-02T15:04:05.000000000" + TimezoneOffsetFormat
RFC3339NanosecondNoTZ = "2006-01-02T15:04:05.000000000"
)

0 comments on commit 702d5de

Please sign in to comment.