WordPress.org

Make WordPress Core

Opened 15 years ago

Closed 15 years ago

Last modified 14 years ago

#2164 closed defect (bug) (fixed)

Timestamp on drafts in preview window shows up as 7pm on 12/31/1969

Reported by: NekoFever Owned by:
Milestone: Priority: normal
Severity: minor Version: 2.0
Component: General Keywords: preview timestamp date bg|has-patch bg|commit
Focuses: Cc:

Description

On 1.5.2 when editing a new post and previewing it the timestamp would change with the edits so that it could be used to see when it was last edited. Now on 2.0 it shows up as 7pm on 12/31/1969 until it is published, at which point it changes to the time and date of publication.

Attachments (2)

2164.diff (435 bytes) - added by davidhouse 15 years ago.
2164-api-use.diff (442 bytes) - added by technosailor 15 years ago.
Uses API to get proper timestamp

Download all attachments as: .zip

Change History (12)

#1 @ryan
15 years ago

Drafts aren't given a timestamp until they are published.

#2 @davidhouse
15 years ago

  • Keywords bg|has-patch added

Yeah, but it's still fixable. Patch attached.

@davidhouse
15 years ago

#3 @NekoFever
15 years ago

I tested the patch and it gave drafts a timestamp, but for some reason they were 5 hours behind. For example, a draft made at 7:41pm would have a timestamp of 2:41pm. When the draft was published the correct timestamp was applied.

#4 @NekoFever
15 years ago

  • Milestone set to 2.1

@technosailor
15 years ago

Uses API to get proper timestamp

#5 @technosailor
15 years ago

Attached fix that uses WP API to generate proper timestamp.

#6 @NekoFever
15 years ago

Yep, seems to work now.

#7 @davidhouse
15 years ago

  • Keywords bg|commit added

Oh, that's a handy little function :) thanks.

#8 @davidhouse
15 years ago

  • Milestone changed from 2.1 to 2.0.1

#9 @ryan
15 years ago

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

(In [3458]) Give draft posts a current timestamp. Props David House and technosailor. fixes #2164

#10 @(none)
14 years ago

  • Milestone 2.0.1 deleted

Milestone 2.0.1 deleted

Note: See TracTickets for help on using tickets.