#29063 closed defect (bug) (duplicate)
function current_time( $type, $gmt = 0 ) don't return GMT if 'Y-m-d H:i:s' is pass as type
Reported by: | pbearne | Owned by: | chriscct7 |
---|---|---|---|
Milestone: | Priority: | normal | |
Severity: | normal | Version: | 3.8 |
Component: | Date/Time | Keywords: | has-patch has-unit-tests bulk-reopened |
Focuses: | Cc: |
Description
Hi Guys
Have been trying to write unit tests for the function current_time() in the functions.php
It works OK if the server/php timezone is GMT but if I run date_default_timezone_set('America/Los_Angeles'); and change the timezone it fails to pass the unit tests
So here are the unit tests and patch that seems to fix it.
It needs better eyes than mine to check this :-) as this a core function
Paul
Attachments (1)
Change History (11)
This ticket was mentioned in IRC in #wordpress-dev by pbearne. View the logs.
10 years ago
#7
follow-up:
↓ 8
@
9 years ago
- Keywords has-patch added; unit-tests removed
- Owner set to chriscct7
- Status changed from new to reviewing
Patch still applies. Needs review.
Note: See
TracTickets for help on using
tickets.
unit test and patch for current time()