[wp-trac] [WordPress Trac] #40657: Deprecate current_time( 'timestamp' )
WordPress Trac
noreply at wordpress.org
Thu Jun 28 03:10:28 UTC 2018
#40657: Deprecate current_time( 'timestamp' )
-------------------------+------------------------------
Reporter: jdgrimes | Owner: (none)
Type: enhancement | Status: new
Priority: normal | Milestone: Awaiting Review
Component: Date/Time | Version:
Severity: normal | Resolution:
Keywords: | Focuses:
-------------------------+------------------------------
Comment (by johnstonphilip):
FWIW, I was one of those learning devs who completely misunderstood, and
had to do massive changes and upgrade routines to fix it all.
I wonder if we could at least remove this out-dated instruction
[here]https://codex.wordpress.org/Function_Reference/current_time:
current_time( 'timestamp' ) should be used in lieu of time() to return
the blog's local time. In WordPress, PHP's time() will always return UTC
and is the same as calling current_time( 'timestamp', true ).
--
Ticket URL: <https://core.trac.wordpress.org/ticket/40657#comment:3>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list