Given a timestamp in two timezones and a table ```...
# questions-and-troubleshooting
c
Given a timestamp in two timezones and a table
Copy code
Local Timestamp: 2025-11-19T08:27:02 (+11 timezone)
UTC timestamp: 2025-11-18T21:27:02Z

+------------------------+----------------+------+-------+---------+-------+
| Field                  | Type           | Null | Key   | Default | Extra |
+------------------------+----------------+------+-------+---------+-------+
| created_at             | datetime       | NO   | true  | NULL    |       |

INSERT INTO `my_table` (`created_at`) VALUES ('2025-11-18 21:27:02.000000 +00:00')
When I issue a query
Copy code
--                                               vvvvvvvvvvvvvvvvvvvvvvvv this got messed up
select created_at from my_table where created_at='2025-11-18T21:27:02+11' \G;
select created_at from my_table where created_at='2025-11-18T21:27:02' \G;
-- the above two returned the same result

-- result
created_at: 2025-11-18 21:27:02

-- use the original local TS didn't work
select created_at from my_table where created_at='2025-11-19T08:27:02+11 \G;
I don't expect any return as the timestamp 2025-11-18T212702 is in the wrong timezone, but Starrocks did return me a row, as if Starrocks completely ignored the
+11
in my query. Why is that? I thought I am storing the TS in UTC and when I query with a TS with local timezone, it would do the conversion automatically?
a
I think you should check timezone information in FE
Copy code
SELECT @@session.time_zone, @@global.time_zone, @@system_time_zone, CURRENT_TIMESTAMP();
and if it is diff your expectation, please check the mysql client. sometimes the client can change time format in query Especially if you're using Grafana’s MySQL Datasource, the query will be sent in UTC.