Ticket #6489 (closed defect (bug): fixed)
Revisions do not respect time zone offset
| Reported by: |
|
Owned by: |
|
|---|---|---|---|
| Priority: | high | Milestone: | 2.7.1 |
| Component: | Revisions | Version: | 2.5 |
| Severity: | major | Keywords: | autosave revision timezone offset has-patch dev-feedback needs-testing |
| Cc: | janbrasna |
Description
The timestamp on the autosave message doesn't include the time zone offset. The reported time is therefore confusing.
Attachments
Change History
- Summary changed from Autosave does not respect time zone offset to sorry, forgot not to set that milestone!
- Milestone 2.5.1 deleted
- Summary changed from sorry, forgot not to set that milestone! to Autosave does not respect time zone offset
comment:3
Viper007Bond — 4 years ago
Yeah, I had this occur to me the other day and confused the hell outta me.
comment:5
Viper007Bond — 4 years ago
Also see this dupe: #6563
- Keywords revision timezone offset added
- Priority changed from low to high
- Summary changed from Autosave does not respect time zone offset to Revisions do not respect time zone if offset differs between settings and server
- Severity changed from minor to major
- Milestone changed from 2.9 to 2.7
It's not only autosave, the whole revision system uses server time zone for display.
I think that the severity is rather high, because it leads to using wrong versions or total confusion.
Basically it's borked at the point when the datetime of a revision is retrieved via GMT since it's then converted via date_i18n to TZ of the server. Additionally any TZ info of the original revision is lost (imagine you change TZ for daylight savings and then the math via GMT fails to show the original time the revision was saved.) There's AFAIK no reason not to use the actual date with offset info from the DB for displaying it.
Attaching patch, please review.
- Keywords dev-feedback added
- Summary changed from Revisions do not respect time zone if offset differs between settings and server to Revisions do not respect time zone offset
comment:12
markjaquith — 3 years ago
- Status changed from new to closed
- Resolution set to worksforme
- Milestone 2.7 deleted
Works for me... I'm seeing my offset correctly reflected. Reopen if still an issue in WP 2.7 final
comment:13
janbrasna — 3 years ago
- Status changed from closed to reopened
- Resolution worksforme deleted
- Milestone set to 2.7
The bug is still present as of 2.7-RC1-10151 and 2.7-RC2.
Please make sure when tagging as worksforme that you have the same conditions/setup. This bug only occurs when user's local and server time zones differ, see comment:6 ...
I'm attaching a new combined patch which is quite self–explanatory and tested with various time zone combinations, I'd just appreciate some dev-feedback, otherwise it could be checked in.
-
attachment
6489-admin-ajax.php-post-template.php.diff
added
Fixes #6489, obsoletes previous patches.
comment:15
follow-up:
↓ 16
murky — 3 years ago
If I make the changes in the patches above, does this fix this bug?
comment:16
in reply to:
↑ 15
janbrasna — 3 years ago
Replying to murky:
If I make the changes in the patches above, does this fix this bug?
Yes. Use the last patch: 6489-admin-ajax.php-post-template.php.diff
comment:17
follow-up:
↓ 18
murky — 3 years ago
Thanks, I asked as it wasn't marked as 'resolved' - and wondered if there was a little more to fix.
comment:18
in reply to:
↑ 17
janbrasna — 3 years ago
Replying to murky:
as it wasn't marked as 'resolved'
It's just not marked as fixed since it's not checked in the trunk yet.
comment:20
ryan — 3 years ago
- Status changed from reopened to closed
- Resolution set to fixed
