my-ship-it commented on issue #1670:
URL: https://github.com/apache/cloudberry/issues/1670#issuecomment-4214196689
Hi @adnanhamdussalam, thanks for reporting this!
I took a look at this, and it seems like the difference you're seeing might
be related to a **timezone data (`tzdata`) version mismatch** between your OS
and the database, rather than a Cloudberry issue itself.
Here's what I think might be happening:
- The `America/Mexico_City` timezone normally observes **Daylight Saving
Time (DST)**, switching from **CST (UTC-6)** to **CDT (UTC-5)** when DST is
active.
- Your database shows `-05` (CDT/UTC-5), which would suggest it believes DST
is currently in effect.
- Your OS, on the other hand, still shows `CST (UTC-6)`, which could mean
its `tzdata` package has different or older DST rules.
- Interestingly, if you convert both times to UTC, they appear to agree: DB
→ `06:32 - 5h = 11:32 UTC`, OS → `05:33 - 6h = 11:33 UTC`. The small ~1 min gap
is likely just the time between running the two commands.
So the absolute time may actually be consistent — the difference seems to be
in which UTC offset each system thinks is current.
**A few things you could try:**
1. **Check your OS `tzdata` version** and consider updating it to make sure
it has the latest DST rules.
2. **Verify the database UTC time** by running:
```sql
SELECT now() AT TIME ZONE 'UTC';
```
This can help confirm whether the database's absolute time is correct.
3. **If DST isn't needed for your use case**, you could set a fixed-offset
timezone that doesn't observe DST, for example:
```sql
SET timezone = 'America/Regina'; -- always CST/UTC-6, no DST
```
I hope this points you in the right direction! If this doesn't resolve the
issue or if I've misunderstood something, please don't hesitate to share more
details and we'll be happy to dig deeper. 😊
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]