-
Notifications
You must be signed in to change notification settings - Fork 1.5k
Open
Labels
SQLIssues or changes relating to SQL executionIssues or changes relating to SQL executionhacktoberfestA good issue for Hacktoberfest 2025 contributors. No AI-driven commits, pleaseA good issue for Hacktoberfest 2025 contributors. No AI-driven commits, please
Description
Describe the bug
This UNIX timestamp (with microseconds)
1659078123000000
corresponds to this ISO datetime:
2022-07-29T07:02:03.000000Z
When converting to a different time zone using to_timezone(), the timestamp string is "almost" correct, but has a Z timezone designator, which is wrong.
To reproduce
SELECT to_timezone(1659078123000000, 'Europe/Berlin');
outputs
2022-07-29T09:02:03.000000Z
Expected Behavior
Either a local time (no time zone designator)
2022-07-29T09:02:03.000000
or a timestamp with UTC offset
2022-07-29T09:02:03.000000+02:00
Alternatively, in case to_timezone() is expected to output UTC (which I would find confusing, given the description of the function):
2022-07-29T07:02:03.000000Z
Environment
- **QuestDB version**: 6.4.3 (binaries)
- **OS**: Linux desktop 5.15.0-43-generic #46-Ubuntu SMP Tue Jul 12 10:30:17 UTC 2022 x86_64 x86_64 x86_64 GNU/LinuxAdditional context
See also #2363
Metadata
Metadata
Assignees
Labels
SQLIssues or changes relating to SQL executionIssues or changes relating to SQL executionhacktoberfestA good issue for Hacktoberfest 2025 contributors. No AI-driven commits, pleaseA good issue for Hacktoberfest 2025 contributors. No AI-driven commits, please