Make WordPress Core

Opened 18 years ago

Closed 18 years ago

Last modified 18 years ago

#6489 closed defect (bug) (fixed)

Revisions do not respect time zone offset

Reported by: sillybean 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: Focuses:

Description

The timestamp on the autosave message doesn't include the time zone offset. The reported time is therefore confusing.

Attachments (3)

post-template.php.diff (697 bytes ) - added by janbrasna 18 years ago.
admin-ajax.php.diff (546 bytes ) - added by janbrasna 18 years ago.
6489-admin-ajax.php-post-template.php.diff (1.2 KB ) - added by janbrasna 18 years ago.
Fixes #6489, obsoletes previous patches.

Download all attachments as: .zip

Change History (24)

#1 @sillybean
18 years ago

  • Milestone 2.5.1
  • Summary Autosave does not respect time zone offsetsorry, forgot not to set that milestone!

#2 @sillybean
18 years ago

  • Summary sorry, forgot not to set that milestone!Autosave does not respect time zone offset

#3 @Viper007Bond
18 years ago

Yeah, I had this occur to me the other day and confused the hell outta me.

#4 @lloydbudd
18 years ago

  • Milestone2.6

#5 @Viper007Bond
18 years ago

Also see this dupe: #6563

#6 @janbrasna
18 years ago

  • Keywords revision timezone offset added
  • Milestone 2.92.7
  • Priority lowhigh
  • Severity minormajor
  • Summary Autosave does not respect time zone offsetRevisions do not respect time zone if offset differs between settings and server

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.

#7 @janbrasna
18 years ago

The same TZ issue is in the inline flash, see another patch.

#8 @janbrasna
18 years ago

  • Keywords has-patch added

#9 @janbrasna
18 years ago

  • Keywords dev-feedback added
  • Summary Revisions do not respect time zone if offset differs between settings and serverRevisions do not respect time zone offset

#10 @janbrasna
18 years ago

  • Cc janbrasna added

#11 @janbrasna
18 years ago

  • Keywords needs-testing added

Also see this dupe: #8307

#12 @markjaquith
18 years ago

  • Milestone 2.7
  • Resolutionworksforme
  • Status newclosed

Works for me... I'm seeing my offset correctly reflected. Reopen if still an issue in WP 2.7 final

#13 @janbrasna
18 years ago

  • Milestone2.7
  • Resolution worksforme
  • Status closedreopened

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.

@janbrasna
18 years ago

Fixes #6489, obsoletes previous patches.

#14 @DD32
18 years ago

  • Milestone 2.72.7.1

Bumping to 2.7.1

#15 follow-up: @murky
18 years ago

If I make the changes in the patches above, does this fix this bug?

#16 in reply to: ↑ 15 @janbrasna
18 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

#17 follow-up: @murky
18 years ago

Thanks, I asked as it wasn't marked as 'resolved' - and wondered if there was a little more to fix.

#18 in reply to: ↑ 17 @janbrasna
18 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.

#19 @ryan
18 years ago

  • Component AdministrationRevisions

#20 @ryan
18 years ago

  • Resolutionfixed
  • Status reopenedclosed

(In [10490]) Respect time zone when displaying autosave and revision time. Props janbrasna, designsimply. fixes #8750 #6489 for trunk

#21 @ryan
18 years ago

(In [10491]) Respect time zone when displaying autosave and revision time. Props janbrasna, designsimply. fixes #8750 #6489 for 2.7

Note: See TracTickets for help on using tickets.