Skip to content

Commit

Permalink
fix(cubestore): Correct convert_tz implementation: correct sign
Browse files Browse the repository at this point in the history
  • Loading branch information
paveltiunov committed Jan 29, 2021
1 parent f06d91e commit 999e00a
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions rust/cubestore/src/sql/mod.rs
Expand Up @@ -2013,17 +2013,17 @@ mod tests {
.exec_query(
"SELECT date_trunc('day', `t`) `day`, sum(`amount`) \
FROM foo.timestamps `timestamp` \
WHERE `t` >= convert_tz(to_timestamp('2020-01-02T08:00:00.000Z'), '+08:00') GROUP BY 1",
WHERE `t` >= convert_tz(to_timestamp('2020-01-02T08:00:00.000Z'), '-08:00') GROUP BY 1",
)
.await
.unwrap();

assert_eq!(
result.get_rows()[0],
Row::new(vec![
result.get_rows(),
&vec![Row::new(vec![
TableValue::Timestamp(TimestampValue::new(1577923200000000000)),
TableValue::Int(3)
])
])]
);
})
.await;
Expand Down

0 comments on commit 999e00a

Please sign in to comment.