Skip to content

Commit

Permalink
cleanup db_now() phpdoc
Browse files Browse the repository at this point in the history
db_now() returns a Unix timestamp, not a DATETIME-formatted string as
currently described in the DocBlock. This updates the function
description.

Fixes #21725

Signed-off-by: Damien Regad <dregad@mantisbt.org>
  • Loading branch information
val-kulkov authored and dregad committed Sep 29, 2016
1 parent 35b21c3 commit cd74a2e
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions core/database_api.php
Expand Up @@ -838,9 +838,8 @@ function db_prepare_bool( $p_bool ) {
}

/**
* return current timestamp for DB
* @todo add param bool $p_gmt whether to use GMT or current timezone (default false)
* @return string Formatted Date for DB insertion e.g. 1970-01-01 00:00:00 ready for database insertion
* return current time as Unix timestamp
* @return integer Unix timestamp of the current date and time
*/
function db_now() {
return time();
Expand Down Expand Up @@ -1289,4 +1288,4 @@ function db_mysql_fix_utf8( $p_string ) {
*/
function db_empty_result() {
return new ADORecordSet_empty();
}
}

0 comments on commit cd74a2e

Please sign in to comment.