WordPress.org

Make WordPress Core

Opened 5 years ago

Closed 4 years ago

#10915 closed defect (bug) (fixed)

DRY: WP should use current_time() to calculate current time

Reported by: filosofo Owned by: ryan
Milestone: 3.0 Priority: normal
Severity: normal Version:
Component: Date/Time Keywords: has-patch current_time
Focuses: Cc:

Description

Multiple places in the code calculate the current time, repeating what current_time('timestamp') already does.

Patch fixes.

Attachments (2)

use.current_time.10915.diff (3.2 KB) - added by filosofo 5 years ago.
10915.patch (3.1 KB) - added by hakre 4 years ago.

Download all attachments as: .zip

Change History (8)

comment:1 ryan5 years ago

  • Component changed from General to Date/Time

comment:2 ryan4 years ago

  • Milestone changed from 2.9 to 3.0

Related: #9588 #8662

comment:3 Denis-de-Bernardy4 years ago

  • Cc Denis-de-Bernardy added

hakre4 years ago

comment:4 hakre4 years ago

Patch still applied clean. Found a duplicate line in the review and therefore updated the patch.

comment:5 ryan4 years ago

See also #11672 and #11665.

comment:6 automattor4 years ago

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

(In [12590]) Use current_time() to calculate current time. Props filosofo. fixes #10915

Note: See TracTickets for help on using tickets.