Make WordPress Core

Opened 6 years ago

Closed 6 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:


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 6 years ago.
10915.patch (3.1 KB) - added by hakre 6 years ago.

Download all attachments as: .zip

Change History (8)

#1 @ryan
6 years ago

  • Component changed from General to Date/Time

#2 @ryan
6 years ago

  • Milestone changed from 2.9 to 3.0

Related: #9588 #8662

#3 @Denis-de-Bernardy
6 years ago

  • Cc Denis-de-Bernardy added

6 years ago

#4 @hakre
6 years ago

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

#5 @ryan
6 years ago

See also #11672 and #11665.

#6 @automattor
6 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.