Bug #208
Timezone is not always correctly set, and incorrect dates shown
| Status: | Closed | Start date: | 2009-12-06 | |
|---|---|---|---|---|
| Priority: | Critical | Due date: | ||
| Assignee: | Alex Cartwright | % Done: | 100% |
|
| Category: | Zula::Libraries | |||
| Target version: | 2.5.1 | |||
| PHP Version: |
Description
When changing the timezone used within TangoCMS, it doesn't always change it - but instead reverts to UTC. However, when it does work the wrong date is still shown since PHP is taking the original string date format and converting it into a different timezone to what it was generated in.
This also effects relative dates for the same reason.
Original bug report by submitted:
When having the time set to GMT +1 and creating an article it prints "1 hour ago", instead of 20 seconds ago or whatever. When I set the time to GMT it prints "20 seconds ago", which is correct.
History
Updated by Alex Cartwright about 2 years ago
- Priority changed from High to Undecided
What happens when you turn off relative dates? 'Settings -> Date & Time -> Use Relative Date?' Does it display the correct time after you disable it? Thinking it may be just a relative issue.
Updated by Alex Cartwright about 2 years ago
- Subject changed from Time of articles to Timezone is not always correctly set, and incorrect dates shown
- Category set to Zula::Libraries
- Status changed from New to Confirmed
- Assignee set to Alex Cartwright
- Priority changed from Undecided to Critical
Updated the description since I found out what was wrong, appears to be a regression within the development of 2.4.x. Previous stable versions are not effected entirely.
Updated by Alex Cartwright about 2 years ago
- Status changed from Confirmed to Closed
- % Done changed from 0 to 100
Applied in changeset r2836.
Updated by Alex Cartwright almost 2 years ago
- Status changed from Closed to Confirmed
- % Done changed from 100 to 80
Reopening since we've found another related issue. Dates are stored in database using the MySQL local time, which can differ due to use of NOW. We need to change over to UTC_TIMESTAMP() so all are in UTC timezone, and then let PHP convert it into what ever is required from there.
Updated by Alex Cartwright almost 2 years ago
- Status changed from Confirmed to Closed
- % Done changed from 80 to 100
Applied in changeset commit:"d15a93778e219d78c08ef213ffb8997556ac900d".