Make WordPress Core

Opened 15 years ago

Closed 15 years ago

Last modified 15 years ago

#8750 closed defect (bug) (fixed)

'Draft Saved' current_time not reflecting timezone setting in the edit area

Reported by: designsimply's profile designsimply Owned by:
Milestone: 2.7.1 Priority: normal
Severity: normal Version:
Component: General Keywords: has-patch
Focuses: Cc:

Description

If you open a draft post for editing, you will see the following string below the edit textarea after autosave:
Draft Saved at 7:45:11 pm. Last edited by Sheri on December 29, 2008 at 2:43 pm

The 'draft saved' time reflects the server time and does not reflect the timezone setting from the WordPress options, while the 'last edited' time does reflect the timezone set in the WordPress options. It will be difficult to see this if you are using a server with a timezone set to your current timezone (i.e. localhost). To test, set your server to UTC or a timezone other than the one in the blog options.
http://img.skitch.com/20081229-pyqggxugiisiejfnms6dggqsnn.png

To fix this, remove the "true" parameter from the call to current_time in wp-admin/admin-ajax.php. The documentation in wp-includes/functions.php also needs to be fixed. See attached diff files.

Attachments (2)

functions.php.diff (1.0 KB) - added by designsimply 15 years ago.
Update current_time documentation.
admin-ajax.php.diff (483 bytes) - added by designsimply 15 years ago.
Make current_time respect the timezone setting on the draft edit page.

Download all attachments as: .zip

Change History (5)

@designsimply
15 years ago

Update current_time documentation.

@designsimply
15 years ago

Make current_time respect the timezone setting on the draft edit page.

#1 @Denis-de-Bernardy
15 years ago

  • Keywords has-patch added

#2 @ryan
15 years ago

  • Resolution set to fixed
  • Status changed from new to closed

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

#3 @ryan
15 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.