MediaWiki REL1_28
ApiQueryAllUsers.php
Go to the documentation of this file.
1<?php
33 public function __construct( ApiQuery $query, $moduleName ) {
34 parent::__construct( $query, $moduleName, 'au' );
35 }
36
43 private function getCanonicalUserName( $name ) {
44 return strtr( $name, '_', ' ' );
45 }
46
47 public function execute() {
49 $activeUserDays = $this->getConfig()->get( 'ActiveUserDays' );
50
51 $db = $this->getDB();
52
53 $prop = $params['prop'];
54 if ( !is_null( $prop ) ) {
55 $prop = array_flip( $prop );
56 $fld_blockinfo = isset( $prop['blockinfo'] );
57 $fld_editcount = isset( $prop['editcount'] );
58 $fld_groups = isset( $prop['groups'] );
59 $fld_rights = isset( $prop['rights'] );
60 $fld_registration = isset( $prop['registration'] );
61 $fld_implicitgroups = isset( $prop['implicitgroups'] );
62 $fld_centralids = isset( $prop['centralids'] );
63 } else {
64 $fld_blockinfo = $fld_editcount = $fld_groups = $fld_registration =
65 $fld_rights = $fld_implicitgroups = $fld_centralids = false;
66 }
67
68 $limit = $params['limit'];
69
70 $this->addTables( 'user' );
71
72 $dir = ( $params['dir'] == 'descending' ? 'older' : 'newer' );
73 $from = is_null( $params['from'] ) ? null : $this->getCanonicalUserName( $params['from'] );
74 $to = is_null( $params['to'] ) ? null : $this->getCanonicalUserName( $params['to'] );
75
76 # MySQL can't figure out that 'user_name' and 'qcc_title' are the same
77 # despite the JOIN condition, so manually sort on the correct one.
78 $userFieldToSort = $params['activeusers'] ? 'qcc_title' : 'user_name';
79
80 # Some of these subtable joins are going to give us duplicate rows, so
81 # calculate the maximum number of duplicates we might see.
82 $maxDuplicateRows = 1;
83
84 $this->addWhereRange( $userFieldToSort, $dir, $from, $to );
85
86 if ( !is_null( $params['prefix'] ) ) {
87 $this->addWhere( $userFieldToSort .
88 $db->buildLike( $this->getCanonicalUserName( $params['prefix'] ), $db->anyString() ) );
89 }
90
91 if ( !is_null( $params['rights'] ) && count( $params['rights'] ) ) {
92 $groups = [];
93 foreach ( $params['rights'] as $r ) {
94 $groups = array_merge( $groups, User::getGroupsWithPermission( $r ) );
95 }
96
97 // no group with the given right(s) exists, no need for a query
98 if ( !count( $groups ) ) {
99 $this->getResult()->addIndexedTagName( [ 'query', $this->getModuleName() ], '' );
100
101 return;
102 }
103
104 $groups = array_unique( $groups );
105
106 if ( is_null( $params['group'] ) ) {
107 $params['group'] = $groups;
108 } else {
109 $params['group'] = array_unique( array_merge( $params['group'], $groups ) );
110 }
111 }
112
113 if ( !is_null( $params['group'] ) && !is_null( $params['excludegroup'] ) ) {
114 $this->dieUsage( 'group and excludegroup cannot be used together', 'group-excludegroup' );
115 }
116
117 if ( !is_null( $params['group'] ) && count( $params['group'] ) ) {
118 // Filter only users that belong to a given group. This might
119 // produce as many rows-per-user as there are groups being checked.
120 $this->addTables( 'user_groups', 'ug1' );
121 $this->addJoinConds( [ 'ug1' => [ 'INNER JOIN', [ 'ug1.ug_user=user_id',
122 'ug1.ug_group' => $params['group'] ] ] ] );
123 $maxDuplicateRows *= count( $params['group'] );
124 }
125
126 if ( !is_null( $params['excludegroup'] ) && count( $params['excludegroup'] ) ) {
127 // Filter only users don't belong to a given group. This can only
128 // produce one row-per-user, because we only keep on "no match".
129 $this->addTables( 'user_groups', 'ug1' );
130
131 if ( count( $params['excludegroup'] ) == 1 ) {
132 $exclude = [ 'ug1.ug_group' => $params['excludegroup'][0] ];
133 } else {
134 $exclude = [ $db->makeList(
135 [ 'ug1.ug_group' => $params['excludegroup'] ],
136 LIST_OR
137 ) ];
138 }
139 $this->addJoinConds( [ 'ug1' => [ 'LEFT OUTER JOIN',
140 array_merge( [ 'ug1.ug_user=user_id' ], $exclude )
141 ] ] );
142 $this->addWhere( 'ug1.ug_user IS NULL' );
143 }
144
145 if ( $params['witheditsonly'] ) {
146 $this->addWhere( 'user_editcount > 0' );
147 }
148
149 $this->showHiddenUsersAddBlockInfo( $fld_blockinfo );
150
151 if ( $fld_groups || $fld_rights ) {
152 $this->addFields( [ 'groups' =>
153 $db->buildGroupConcatField( '|', 'user_groups', 'ug_group', 'ug_user=user_id' )
154 ] );
155 }
156
157 if ( $params['activeusers'] ) {
158 $activeUserSeconds = $activeUserDays * 86400;
159
160 // Filter query to only include users in the active users cache.
161 // There shouldn't be any duplicate rows in querycachetwo here.
162 $this->addTables( 'querycachetwo' );
163 $this->addJoinConds( [ 'querycachetwo' => [
164 'INNER JOIN', [
165 'qcc_type' => 'activeusers',
166 'qcc_namespace' => NS_USER,
167 'qcc_title=user_name',
168 ],
169 ] ] );
170
171 // Actually count the actions using a subquery (bug 64505 and bug 64507)
172 $timestamp = $db->timestamp( wfTimestamp( TS_UNIX ) - $activeUserSeconds );
173 $this->addFields( [
174 'recentactions' => '(' . $db->selectSQLText(
175 'recentchanges',
176 'COUNT(*)',
177 [
178 'rc_user_text = user_name',
179 'rc_type != ' . $db->addQuotes( RC_EXTERNAL ), // no wikidata
180 'rc_log_type IS NULL OR rc_log_type != ' . $db->addQuotes( 'newusers' ),
181 'rc_timestamp >= ' . $db->addQuotes( $timestamp ),
182 ]
183 ) . ')'
184 ] );
185 }
186
187 $sqlLimit = $limit + $maxDuplicateRows;
188 $this->addOption( 'LIMIT', $sqlLimit );
189
190 $this->addFields( [
191 'user_name',
192 'user_id'
193 ] );
194 $this->addFieldsIf( 'user_editcount', $fld_editcount );
195 $this->addFieldsIf( 'user_registration', $fld_registration );
196
197 $res = $this->select( __METHOD__ );
198 $count = 0;
199 $countDuplicates = 0;
200 $lastUser = false;
201 $result = $this->getResult();
202 foreach ( $res as $row ) {
203 $count++;
204
205 if ( $lastUser === $row->user_name ) {
206 // Duplicate row due to one of the needed subtable joins.
207 // Ignore it, but count the number of them to sanely handle
208 // miscalculation of $maxDuplicateRows.
209 $countDuplicates++;
210 if ( $countDuplicates == $maxDuplicateRows ) {
211 ApiBase::dieDebug( __METHOD__, 'Saw more duplicate rows than expected' );
212 }
213 continue;
214 }
215
216 $countDuplicates = 0;
217 $lastUser = $row->user_name;
218
219 if ( $count > $limit ) {
220 // We've reached the one extra which shows that there are
221 // additional pages to be had. Stop here...
222 $this->setContinueEnumParameter( 'from', $row->user_name );
223 break;
224 }
225
226 if ( $count == $sqlLimit ) {
227 // Should never hit this (either the $countDuplicates check or
228 // the $count > $limit check should hit first), but check it
229 // anyway just in case.
230 ApiBase::dieDebug( __METHOD__, 'Saw more duplicate rows than expected' );
231 }
232
233 if ( $params['activeusers'] && $row->recentactions === 0 ) {
234 // activeusers cache was out of date
235 continue;
236 }
237
238 $data = [
239 'userid' => (int)$row->user_id,
240 'name' => $row->user_name,
241 ];
242
243 if ( $fld_centralids ) {
245 $this->getConfig(), User::newFromId( $row->user_id ), $params['attachedwiki']
246 );
247 }
248
249 if ( $fld_blockinfo && !is_null( $row->ipb_by_text ) ) {
250 $data['blockid'] = (int)$row->ipb_id;
251 $data['blockedby'] = $row->ipb_by_text;
252 $data['blockedbyid'] = (int)$row->ipb_by;
253 $data['blockedtimestamp'] = wfTimestamp( TS_ISO_8601, $row->ipb_timestamp );
254 $data['blockreason'] = $row->ipb_reason;
255 $data['blockexpiry'] = $row->ipb_expiry;
256 }
257 if ( $row->ipb_deleted ) {
258 $data['hidden'] = true;
259 }
260 if ( $fld_editcount ) {
261 $data['editcount'] = intval( $row->user_editcount );
262 }
263 if ( $params['activeusers'] ) {
264 $data['recentactions'] = intval( $row->recentactions );
265 // @todo 'recenteditcount' is set for BC, remove in 1.25
266 $data['recenteditcount'] = $data['recentactions'];
267 }
268 if ( $fld_registration ) {
269 $data['registration'] = $row->user_registration ?
270 wfTimestamp( TS_ISO_8601, $row->user_registration ) : '';
271 }
272
273 if ( $fld_implicitgroups || $fld_groups || $fld_rights ) {
274 $implicitGroups = User::newFromId( $row->user_id )->getAutomaticGroups();
275 if ( isset( $row->groups ) && $row->groups !== '' ) {
276 $groups = array_merge( $implicitGroups, explode( '|', $row->groups ) );
277 } else {
278 $groups = $implicitGroups;
279 }
280
281 if ( $fld_groups ) {
282 $data['groups'] = $groups;
283 ApiResult::setIndexedTagName( $data['groups'], 'g' );
284 ApiResult::setArrayType( $data['groups'], 'array' );
285 }
286
287 if ( $fld_implicitgroups ) {
288 $data['implicitgroups'] = $implicitGroups;
289 ApiResult::setIndexedTagName( $data['implicitgroups'], 'g' );
290 ApiResult::setArrayType( $data['implicitgroups'], 'array' );
291 }
292
293 if ( $fld_rights ) {
294 $data['rights'] = User::getGroupPermissions( $groups );
295 ApiResult::setIndexedTagName( $data['rights'], 'r' );
296 ApiResult::setArrayType( $data['rights'], 'array' );
297 }
298 }
299
300 $fit = $result->addValue( [ 'query', $this->getModuleName() ], null, $data );
301 if ( !$fit ) {
302 $this->setContinueEnumParameter( 'from', $data['name'] );
303 break;
304 }
305 }
306
307 $result->addIndexedTagName( [ 'query', $this->getModuleName() ], 'u' );
308 }
309
310 public function getCacheMode( $params ) {
311 return 'anon-public-user-private';
312 }
313
314 public function getAllowedParams() {
315 $userGroups = User::getAllGroups();
316
317 return [
318 'from' => null,
319 'to' => null,
320 'prefix' => null,
321 'dir' => [
322 ApiBase::PARAM_DFLT => 'ascending',
324 'ascending',
325 'descending'
326 ],
327 ],
328 'group' => [
329 ApiBase::PARAM_TYPE => $userGroups,
331 ],
332 'excludegroup' => [
333 ApiBase::PARAM_TYPE => $userGroups,
335 ],
336 'rights' => [
337 ApiBase::PARAM_TYPE => User::getAllRights(),
339 ],
340 'prop' => [
343 'blockinfo',
344 'groups',
345 'implicitgroups',
346 'rights',
347 'editcount',
348 'registration',
349 'centralids',
350 ],
352 ],
353 'limit' => [
355 ApiBase::PARAM_TYPE => 'limit',
359 ],
360 'witheditsonly' => false,
361 'activeusers' => [
362 ApiBase::PARAM_DFLT => false,
364 'apihelp-query+allusers-param-activeusers',
365 $this->getConfig()->get( 'ActiveUserDays' )
366 ],
367 ],
368 'attachedwiki' => null,
369 ];
370 }
371
372 protected function getExamplesMessages() {
373 return [
374 'action=query&list=allusers&aufrom=Y'
375 => 'apihelp-query+allusers-example-Y',
376 ];
377 }
378
379 public function getHelpUrls() {
380 return 'https://www.mediawiki.org/wiki/API:Allusers';
381 }
382}
wfTimestamp( $outputtype=TS_UNIX, $ts=0)
Get a timestamp string in one of various formats.
const PARAM_MAX2
(integer) Max value allowed for the parameter for users with the apihighlimits right,...
Definition ApiBase.php:97
const PARAM_MAX
(integer) Max value allowed for the parameter, for PARAM_TYPE 'integer' and 'limit'.
Definition ApiBase.php:91
static dieDebug( $method, $message)
Internal code errors should be reported with this method.
Definition ApiBase.php:2295
const PARAM_TYPE
(string|string[]) Either an array of allowed value strings, or a string type as described below.
Definition ApiBase.php:88
const PARAM_DFLT
(null|boolean|integer|string) Default value of the parameter.
Definition ApiBase.php:50
extractRequestParams( $parseLimit=true)
Using getAllowedParams(), this function makes an array of the values provided by the user,...
Definition ApiBase.php:685
const PARAM_HELP_MSG_PER_VALUE
((string|array|Message)[]) When PARAM_TYPE is an array, this is an array mapping those values to $msg...
Definition ApiBase.php:157
const PARAM_MIN
(integer) Lowest value allowed for the parameter, for PARAM_TYPE 'integer' and 'limit'.
Definition ApiBase.php:100
const LIMIT_BIG1
Fast query, standard limit.
Definition ApiBase.php:184
getResult()
Get the result object.
Definition ApiBase.php:584
const PARAM_HELP_MSG
(string|array|Message) Specify an alternative i18n documentation message for this parameter.
Definition ApiBase.php:125
const LIMIT_BIG2
Fast query, apihighlimits limit.
Definition ApiBase.php:186
getModuleName()
Get the name of the module being executed by this instance.
Definition ApiBase.php:464
dieUsage( $description, $errorCode, $httpRespCode=0, $extradata=null)
Throw a UsageException, which will (if uncaught) call the main module's error handler and die with an...
Definition ApiBase.php:1585
const PARAM_ISMULTI
(boolean) Accept multiple pipe-separated values for this parameter (e.g.
Definition ApiBase.php:53
Query module to enumerate all registered users.
__construct(ApiQuery $query, $moduleName)
execute()
Evaluates the parameters, performs the requested query, and sets up the result.
getExamplesMessages()
Returns usage examples for this module.
getAllowedParams()
Returns an array of allowed parameters (parameter name) => (default value) or (parameter name) => (ar...
getCacheMode( $params)
Get the cache mode for the data generated by this module.
getCanonicalUserName( $name)
This function converts the user name to a canonical form which is stored in the database.
getHelpUrls()
Return links to more detailed help pages about the module.
This is a base class for all Query modules.
setContinueEnumParameter( $paramName, $paramValue)
Set a query-continue value.
addWhereRange( $field, $dir, $start, $end, $sort=true)
Add a WHERE clause corresponding to a range, and an ORDER BY clause to sort in the right direction.
addFields( $value)
Add a set of fields to select to the internal array.
addOption( $name, $value=null)
Add an option such as LIMIT or USE INDEX.
addTables( $tables, $alias=null)
Add a set of tables to the internal array.
getDB()
Get the Query database connection (read-only)
addFieldsIf( $value, $condition)
Same as addFields(), but add the fields only if a condition is met.
addJoinConds( $join_conds)
Add a set of JOIN conditions to the internal array.
addWhere( $value)
Add a set of WHERE clauses to the internal array.
showHiddenUsersAddBlockInfo( $showBlockInfo)
Filters hidden users (where the user doesn't have the right to view them) Also adds relevant block in...
static getCentralUserInfo(Config $config, User $user, $attachedWiki=null)
Get central user info.
This is the main query class.
Definition ApiQuery.php:38
static setArrayType(array &$arr, $type, $kvpKeyName=null)
Set the array data type.
static setIndexedTagName(array &$arr, $tag)
Set the tag name for numeric-keyed values in XML format.
getConfig()
Get the Config object.
We use the convention $dbr for read and $dbw for write to help you keep track of whether the database object is a the world will explode Or to be a subsequent write query which succeeded on the master may fail when replicated to the slave due to a unique key collision Replication on the slave will stop and it may take hours to repair the database and get it back online Setting read_only in my cnf on the slave will avoid this but given the dire we prefer to have as many checks as possible We provide a but the wrapper functions like select() and insert() are usually more convenient. They take care of things like table prefixes and escaping for you. If you really need to make your own SQL
$res
Definition database.txt:21
This document is intended to provide useful advice for parties seeking to redistribute MediaWiki to end users It s targeted particularly at maintainers for Linux since it s been observed that distribution packages of MediaWiki often break We ve consistently had to recommend that users seeking support use official tarballs instead of their distribution s and this often solves whatever problem the user is having It would be nice if this could such as
const NS_USER
Definition Defines.php:58
const LIST_OR
Definition Defines.php:38
const RC_EXTERNAL
Definition Defines.php:139
The index of the header message $result[1]=The index of the body text message $result[2 through n]=Parameters passed to body text message. Please note the header message cannot receive/use parameters. 'ImportHandleLogItemXMLTag':When parsing a XML tag in a log item. Return false to stop further processing of the tag $reader:XMLReader object $logInfo:Array of information 'ImportHandlePageXMLTag':When parsing a XML tag in a page. Return false to stop further processing of the tag $reader:XMLReader object & $pageInfo:Array of information 'ImportHandleRevisionXMLTag':When parsing a XML tag in a page revision. Return false to stop further processing of the tag $reader:XMLReader object $pageInfo:Array of page information $revisionInfo:Array of revision information 'ImportHandleToplevelXMLTag':When parsing a top level XML tag. Return false to stop further processing of the tag $reader:XMLReader object 'ImportHandleUploadXMLTag':When parsing a XML tag in a file upload. Return false to stop further processing of the tag $reader:XMLReader object $revisionInfo:Array of information 'ImportLogInterwikiLink':Hook to change the interwiki link used in log entries and edit summaries for transwiki imports. & $fullInterwikiPrefix:Interwiki prefix, may contain colons. & $pageTitle:String that contains page title. 'ImportSources':Called when reading from the $wgImportSources configuration variable. Can be used to lazy-load the import sources list. & $importSources:The value of $wgImportSources. Modify as necessary. See the comment in DefaultSettings.php for the detail of how to structure this array. 'InfoAction':When building information to display on the action=info page. $context:IContextSource object & $pageInfo:Array of information 'InitializeArticleMaybeRedirect':MediaWiki check to see if title is a redirect. & $title:Title object for the current page & $request:WebRequest & $ignoreRedirect:boolean to skip redirect check & $target:Title/string of redirect target & $article:Article object 'InternalParseBeforeLinks':during Parser 's internalParse method before links but after nowiki/noinclude/includeonly/onlyinclude and other processings. & $parser:Parser object & $text:string containing partially parsed text & $stripState:Parser 's internal StripState object 'InternalParseBeforeSanitize':during Parser 's internalParse method just before the parser removes unwanted/dangerous HTML tags and after nowiki/noinclude/includeonly/onlyinclude and other processings. Ideal for syntax-extensions after template/parser function execution which respect nowiki and HTML-comments. & $parser:Parser object & $text:string containing partially parsed text & $stripState:Parser 's internal StripState object 'InterwikiLoadPrefix':When resolving if a given prefix is an interwiki or not. Return true without providing an interwiki to continue interwiki search. $prefix:interwiki prefix we are looking for. & $iwData:output array describing the interwiki with keys iw_url, iw_local, iw_trans and optionally iw_api and iw_wikiid. 'InvalidateEmailComplete':Called after a user 's email has been invalidated successfully. $user:user(object) whose email is being invalidated 'IRCLineURL':When constructing the URL to use in an IRC notification. Callee may modify $url and $query, URL will be constructed as $url . $query & $url:URL to index.php & $query:Query string $rc:RecentChange object that triggered url generation 'IsFileCacheable':Override the result of Article::isFileCacheable()(if true) & $article:article(object) being checked 'IsTrustedProxy':Override the result of IP::isTrustedProxy() & $ip:IP being check & $result:Change this value to override the result of IP::isTrustedProxy() 'IsUploadAllowedFromUrl':Override the result of UploadFromUrl::isAllowedUrl() $url:URL used to upload from & $allowed:Boolean indicating if uploading is allowed for given URL 'isValidEmailAddr':Override the result of Sanitizer::validateEmail(), for instance to return false if the domain name doesn 't match your organization. $addr:The e-mail address entered by the user & $result:Set this and return false to override the internal checks 'isValidPassword':Override the result of User::isValidPassword() $password:The password entered by the user & $result:Set this and return false to override the internal checks $user:User the password is being validated for 'Language::getMessagesFileName':$code:The language code or the language we 're looking for a messages file for & $file:The messages file path, you can override this to change the location. 'LanguageGetMagic':DEPRECATED! Use $magicWords in a file listed in $wgExtensionMessagesFiles instead. Use this to define synonyms of magic words depending of the language & $magicExtensions:associative array of magic words synonyms $lang:language code(string) 'LanguageGetNamespaces':Provide custom ordering for namespaces or remove namespaces. Do not use this hook to add namespaces. Use CanonicalNamespaces for that. & $namespaces:Array of namespaces indexed by their numbers 'LanguageGetSpecialPageAliases':DEPRECATED! Use $specialPageAliases in a file listed in $wgExtensionMessagesFiles instead. Use to define aliases of special pages names depending of the language & $specialPageAliases:associative array of magic words synonyms $lang:language code(string) 'LanguageGetTranslatedLanguageNames':Provide translated language names. & $names:array of language code=> language name $code:language of the preferred translations 'LanguageLinks':Manipulate a page 's language links. This is called in various places to allow extensions to define the effective language links for a page. $title:The page 's Title. & $links:Associative array mapping language codes to prefixed links of the form "language:title". & $linkFlags:Associative array mapping prefixed links to arrays of flags. Currently unused, but planned to provide support for marking individual language links in the UI, e.g. for featured articles. 'LanguageSelector':Hook to change the language selector available on a page. $out:The output page. $cssClassName:CSS class name of the language selector. 'LinkBegin':DEPRECATED! Use HtmlPageLinkRendererBegin instead. Used when generating internal and interwiki links in Linker::link(), before processing starts. Return false to skip default processing and return $ret. See documentation for Linker::link() for details on the expected meanings of parameters. $skin:the Skin object $target:the Title that the link is pointing to & $html:the contents that the< a > tag should have(raw HTML) $result
Definition hooks.txt:1937
this hook is for auditing only RecentChangesLinked and Watchlist RecentChangesLinked and Watchlist e g Watchlist removed from all revisions and log entries to which it was applied This gives extensions a chance to take it off their books as the deletion has already been partly carried out by this point or something similar the user will be unable to create the tag set and then return false from the hook function Ensure you consume the ChangeTagAfterDelete hook to carry out custom deletion actions as context called by AbstractContent::getParserOutput May be used to override the normal model specific rendering of page content as context as context the output can only depend on parameters provided to this hook not on global state indicating whether full HTML should be generated If generation of HTML may be but other information should still be present in the ParserOutput object to manipulate or replace but no entry for that model exists in $wgContentHandlers if desired whether it is OK to use $contentModel on $title Handler functions that modify $ok should generally return false to prevent further hooks from further modifying $ok inclusive $limit
Definition hooks.txt:1135
Allows to change the fields on the form that will be generated $name
Definition hooks.txt:304
null for the local wiki Added should default to null in handler for backwards compatibility add a value to it if you want to add a cookie that have to vary cache options can modify $query
Definition hooks.txt:1595
$from
if(count( $args)==0) $dir
if( $limit) $timestamp
injection txt This is an overview of how MediaWiki makes use of dependency injection The design described here grew from the discussion of RFC T384 The term dependency this means that anything an object needs to operate should be injected from the the object itself should only know narrow no concrete implementation of the logic it relies on The requirement to inject everything typically results in an architecture that based on two main types of and essentially stateless service objects that use other service objects to operate on the value objects As of the beginning MediaWiki is only starting to use the DI approach Much of the code still relies on global state or direct resulting in a highly cyclical dependency which acts as the top level factory for services in MediaWiki which can be used to gain access to default instances of various services MediaWikiServices however also allows new services to be defined and default services to be redefined Services are defined or redefined by providing a callback the instantiator that will return a new instance of the service When it will create an instance of MediaWikiServices and populate it with the services defined in the files listed by thereby bootstrapping the DI framework Per $wgServiceWiringFiles lists includes ServiceWiring php
Definition injection.txt:37
$params
const TS_ISO_8601
ISO 8601 format with no timezone: 1986-02-09T20:00:00Z.
Definition defines.php:28
const TS_UNIX
Unix time - the number of seconds since 1970-01-01 00:00:00 UTC.
Definition defines.php:6