Index: core/kernel/constants.php IDEA additional info: Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP <+>UTF-8 =================================================================== --- core/kernel/constants.php (revision 15917) +++ core/kernel/constants.php (revision ) @@ -130,7 +130,7 @@ define('SUBMISSION_LOG_ATTACHMENT_PATH', WRITEBALE_BASE . '/user_files/submission_log/'); - define('TIMENOW', adodb_mktime()); // for faster message processing + define('TIMENOW', time()); // for faster message processing define('USER_TITLE_FIELD', 'IF(Email = "", Username, Email)'); // site domains \ No newline at end of file Index: core/units/languages/languages_event_handler.php IDEA additional info: Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP <+>UTF-8 =================================================================== --- core/units/languages/languages_event_handler.php (revision 15908) +++ core/units/languages/languages_event_handler.php (revision ) @@ -206,7 +206,7 @@ $field_options = $config->getFieldByName($field); foreach ($field_options['options'] as $option_key => $option_title) { - $field_options['options'][$option_key] .= ' (' . adodb_date($option_key) . ')'; + $field_options['options'][$option_key] .= ' (' . date($option_key) . ')'; } $config->addFields($field_options, $field); \ No newline at end of file Index: core/install/upgrades.php IDEA additional info: Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP <+>UTF-8 =================================================================== --- core/install/upgrades.php (revision 15908) +++ core/install/upgrades.php (revision ) @@ -2016,7 +2016,7 @@ 'IsDraft' => 0, 'FromRevisionId' => 0, 'CreatedById' => USER_ROOT, - 'CreatedOn' => adodb_mktime(), + 'CreatedOn' => time(), 'Status' => STATUS_ACTIVE, ); \ No newline at end of file Index: core/units/helpers/count_helper.php IDEA additional info: Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP <+>UTF-8 =================================================================== --- core/units/helpers/count_helper.php (revision 15908) +++ core/units/helpers/count_helper.php (revision ) @@ -67,7 +67,7 @@ $count_data['IsClone'] = 1; } - $count_data['LastCounted'] = adodb_mktime(); + $count_data['LastCounted'] = time(); $this->Conn->doInsert($count_data, TABLE_PREFIX.'Counters', 'REPLACE'); } @@ -108,7 +108,7 @@ // reset expired counts $sql = 'UPDATE '.TABLE_PREFIX.'Counters SET CountValue = NULL - WHERE (LifeTime > 0) AND (LastCounted < '.adodb_mktime().' - LifeTime)'; + WHERE (LifeTime > 0) AND (LastCounted < '.time().' - LifeTime)'; $this->Conn->Query($sql); $reset = true; } @@ -160,7 +160,7 @@ $where_clauses[] = 'item_table.Status = ' . STATUS_ACTIVE; if ( isset($params['today']) && $params['today'] ) { - $today = adodb_mktime(0, 0, 0, adodb_date('m'), adodb_date('d'), adodb_date('Y')); + $today = mktime(0, 0, 0, date('m'), date('d'), date('Y')); $where_clauses[] = 'item_table.CreatedOn >= ' . $today; } @@ -200,7 +200,7 @@ list ($sql, $where_clause) = $this->attachViewPermissionCheck($prefix, $sql, $where_clause, 'ci.CategoryId'); if ( $today ) { - $today_date = adodb_mktime(0, 0, 0, adodb_date('m'), adodb_date('d'), adodb_date('Y')); + $today_date = mktime(0, 0, 0, date('m'), date('d'), date('Y')); $where_clause[] = 'item_table.CreatedOn >= ' . $today_date; } @@ -220,7 +220,7 @@ $cache_key = 'category_count[%CSerial%]'; if ( $today ) { - $today_date = adodb_mktime(0, 0, 0, adodb_date('m'), adodb_date('d'), adodb_date('Y')); + $today_date = mktime(0, 0, 0, date('m'), date('d'), date('Y')); $cache_key .= ':date=' . $today_date; } \ No newline at end of file Index: core/units/users/users_item.php IDEA additional info: Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP <+>UTF-8 =================================================================== --- core/units/users/users_item.php (revision 15908) +++ core/units/users/users_item.php (revision ) @@ -31,7 +31,7 @@ // primary group goes first $sql = 'SELECT GroupId FROM ' . TABLE_PREFIX . 'UserGroupRelations - WHERE (PortalUserId = ' . $this->GetID() . ') AND ( (MembershipExpires IS NULL) OR (MembershipExpires >= ' . adodb_mktime() . ') ) + WHERE (PortalUserId = ' . $this->GetID() . ') AND ( (MembershipExpires IS NULL) OR (MembershipExpires >= ' . time() . ') ) ORDER BY IF(GroupId = ' . $this->GetDBField('PrimaryGroupId') . ', 1, 0) DESC'; $groups = $this->Conn->GetCol($sql); \ No newline at end of file Index: core/units/helpers/skin_helper.php IDEA additional info: Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP <+>UTF-8 =================================================================== --- core/units/helpers/skin_helper.php (revision 15908) +++ core/units/helpers/skin_helper.php (revision ) @@ -82,7 +82,7 @@ $ret = str_replace('@@' . $key . '@@', $row['Value'], $ret); } - $compile_ts = adodb_mktime(); + $compile_ts = time(); $css_file = $this->_getStylesheetPath() . DIRECTORY_SEPARATOR . 'admin-' . mb_strtolower($object->GetDBField('Name')) . '-' . $compile_ts . '.css'; $fp = fopen($css_file, 'w'); \ No newline at end of file Index: core/kernel/managers/rewrite_url_processor.php IDEA additional info: Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP <+>UTF-8 =================================================================== --- core/kernel/managers/rewrite_url_processor.php (revision 15908) +++ core/kernel/managers/rewrite_url_processor.php (revision ) @@ -327,7 +327,7 @@ 'DomainId' => (int)$this->Application->siteDomainField('DomainId'), 'Prefixes' => $prefixes ? '|' . implode('|', $prefixes) . '|' : '', 'ParsedVars' => serialize($data), - 'Cached' => adodb_mktime(), + 'Cached' => time(), 'LifeTime' => isset($expiration) && is_numeric($expiration) ? $expiration : -1 ); \ No newline at end of file Index: core/units/helpers/curl_helper.php IDEA additional info: Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP <+>UTF-8 =================================================================== --- core/units/helpers/curl_helper.php (revision 15917) +++ core/units/helpers/curl_helper.php (revision ) @@ -372,7 +372,7 @@ 'IsAdmin' => $this->Application->isAdminUser ? 1 : 0, 'PageData' => implode("\n", $page_data), 'RequestData' => $this->requestData, - 'RequestDate' => adodb_mktime(), + 'RequestDate' => time(), ); $this->Conn->doInsert($fields_hash, TABLE_PREFIX . 'CurlLog'); @@ -506,7 +506,7 @@ if ( $this->debugMode ) { $fields_hash = Array ( 'ResponseData' => $this->lastResponse, - 'ResponseDate' => adodb_mktime(), + 'ResponseDate' => time(), 'ResponseHttpCode' => $this->lastHTTPCode, 'CurlError' => $this->lastErrorCode != 0 ? '#' . $this->lastErrorCode . ' (' . $this->lastErrorMsg . ')' : '', ); Index: core/units/helpers/page_helper.php IDEA additional info: Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP <+>UTF-8 =================================================================== --- core/units/helpers/page_helper.php (revision 15908) +++ core/units/helpers/page_helper.php (revision ) @@ -127,7 +127,7 @@ ); if ( !isset($to_date) ) { - $to_date = adodb_mktime(); + $to_date = time(); } $diff = abs($to_date - $from_date); Index: core/units/helpers/spam_helper.php IDEA additional info: Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP <+>UTF-8 =================================================================== --- core/units/helpers/spam_helper.php (revision 15908) +++ core/units/helpers/spam_helper.php (revision ) @@ -92,7 +92,7 @@ $expiration = $delay_value * $delay_interval; } - $this->Expiration = adodb_mktime() + $expiration; + $this->Expiration = time() + $expiration; } /** @@ -177,7 +177,7 @@ $cache =& $this->ExpirationCache[$this->DataType]; $expires = array_key_exists($this->ResourceId, $cache) ? $cache[$this->ResourceId] : false; - if ( $expires && $expires < adodb_mktime() ) { + if ( $expires && $expires < time() ) { // spam control record is expired $sql = 'DELETE FROM ' . $this->TableName . ' WHERE ' . $key_clause; \ No newline at end of file Index: core/kernel/db/cat_tag_processor.php IDEA additional info: Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP <+>UTF-8 =================================================================== --- core/kernel/db/cat_tag_processor.php (revision 15908) +++ core/kernel/db/cat_tag_processor.php (revision ) @@ -679,7 +679,7 @@ } } - return adodb_date($format, $date); + return date($format, $date); } /** \ No newline at end of file Index: core/kernel/utility/formatters/upload_formatter.php IDEA additional info: Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP <+>UTF-8 =================================================================== --- core/kernel/utility/formatters/upload_formatter.php (revision 15908) +++ core/kernel/utility/formatters/upload_formatter.php (revision ) @@ -537,7 +537,7 @@ break; case StorageEngine::TIMESTAMP: - $folder_path = adodb_date('Y-m/d/'); + $folder_path = date('Y-m/d/'); break; default: @@ -584,7 +584,7 @@ ); $replace_to = Array ( - adodb_date('Ymd-His'), $unit_prefix, 'u' . $this->Application->RecallVar('user_id') + date('Ymd-His'), $unit_prefix, 'u' . $this->Application->RecallVar('user_id') ); return str_replace($replace_from, $replace_to, $option); \ No newline at end of file Index: core/units/forms/forms/forms_eh.php IDEA additional info: Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP <+>UTF-8 =================================================================== --- core/units/forms/forms/forms_eh.php (revision 15908) +++ core/units/forms/forms/forms_eh.php (revision ) @@ -572,8 +572,8 @@ $form_submission->SetDBFieldsFromHash($submission_fields); $form_submission->SetDBField('FormId', $form_id); $form_submission->SetDBField('MessageId', $fields_hash['MessageId']); - $form_submission->SetDBField('SubmissionTime_date', adodb_mktime()); - $form_submission->SetDBField('SubmissionTime_time', adodb_mktime()); + $form_submission->SetDBField('SubmissionTime_date', time()); + $form_submission->SetDBField('SubmissionTime_time', time()); $form_submission->SetDBField('ReferrerURL', $this->Application->Phrase('la_Text_Email')); return $form_submission->Create(); \ No newline at end of file Index: core/kernel/db/dbitem.php IDEA additional info: Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP <+>UTF-8 =================================================================== --- core/kernel/db/dbitem.php (revision 15908) +++ core/kernel/db/dbitem.php (revision ) @@ -1198,7 +1198,7 @@ $fields_hash = Array ( 'Prefix' => $this->Prefix, 'ItemId' => $this->GetID(), - 'OccuredOn' => adodb_mktime(), + 'OccuredOn' => time(), 'MasterPrefix' => $main_prefix, 'Action' => $mode, ); \ No newline at end of file Index: core/units/users/users_tag_processor.php IDEA additional info: Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP <+>UTF-8 =================================================================== --- core/units/users/users_tag_processor.php (revision 15908) +++ core/units/users/users_tag_processor.php (revision ) @@ -40,8 +40,8 @@ $code = $this->getCachedCode(); $user->SetDBField('PwResetConfirm', $code); - $user->SetDBField('PwRequestTime_date', adodb_mktime()); - $user->SetDBField('PwRequestTime_time', adodb_mktime()); + $user->SetDBField('PwRequestTime_date', time()); + $user->SetDBField('PwRequestTime_time', time()); if ( $user->GetChangedFields() ) { // tag is called 2 times within USER.PWDC email event, so don't update user record twice @@ -269,8 +269,8 @@ $code = $this->getCachedCode(); $object->SetDBField('PwResetConfirm', $code); - $object->SetDBField('PwRequestTime_date', adodb_mktime()); - $object->SetDBField('PwRequestTime_time', adodb_mktime()); + $object->SetDBField('PwRequestTime_date', time()); + $object->SetDBField('PwRequestTime_time', time()); $object->Update(); $params['user_key'] = $code; \ No newline at end of file Index: core/units/forms/submission_log/submission_log_eh.php IDEA additional info: Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP <+>UTF-8 =================================================================== --- core/units/forms/submission_log/submission_log_eh.php (revision 15908) +++ core/units/forms/submission_log/submission_log_eh.php (revision ) @@ -501,7 +501,7 @@ $object = $event->getObject(); /* @var $object kDBItem */ - $now = adodb_mktime(); + $now = time(); $sent_status = $object->GetDBField('SentStatus'); if (($event->Special != 'merge') && ($sent_status == SUBMISSION_LOG_SENT) && ($sent_status != $object->GetOriginalField('SentStatus'))) { \ No newline at end of file Index: core/kernel/managers/scheduled_task_manager.php IDEA additional info: Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP <+>UTF-8 =================================================================== --- core/kernel/managers/scheduled_task_manager.php (revision 15908) +++ core/kernel/managers/scheduled_task_manager.php (revision ) @@ -64,7 +64,7 @@ } if ( !isset($scheduled_tasks) ) { - $timeout_clause = 'LastRunStatus = ' . ScheduledTask::LAST_RUN_RUNNING . ' AND Timeout > 0 AND ' . adodb_mktime() . ' - LastRunOn > Timeout'; + $timeout_clause = 'LastRunStatus = ' . ScheduledTask::LAST_RUN_RUNNING . ' AND Timeout > 0 AND ' . time() . ' - LastRunOn > Timeout'; $sql = 'SELECT * FROM ' . $this->Application->getUnitConfig('scheduled-task')->getTableName() . ' @@ -135,12 +135,12 @@ // remember LastTimeoutOn only for events that are still running and will be reset if ( $event_data['LastRunStatus'] == ScheduledTask::LAST_RUN_RUNNING ) { - $this->update($event_data, Array ('LastTimeoutOn' => adodb_mktime())); + $this->update($event_data, Array ('LastTimeoutOn' => time())); } $next_run = (int)$event_data['NextRunOn']; - if ($next_run && ($next_run > adodb_mktime())) { + if ($next_run && ($next_run > time())) { continue; } @@ -169,7 +169,7 @@ $cron_helper = $this->Application->recallObject('kCronHelper'); /* @var $cron_helper kCronHelper */ - $start_time = adodb_mktime(); + $start_time = time(); // remember, when scheduled task execution started $fields_hash = Array ( @@ -189,7 +189,7 @@ $event->MasterEvent = new kEvent('scheduled-task:OnRun'); $this->Application->HandleEvent($event); - $now = adodb_mktime(); + $now = time(); $next_run = $cron_helper->getMatch($scheduled_task_data['RunSchedule'], $start_time); while ($next_run < $now) { \ No newline at end of file Index: core/kernel/nparser/template_cache.php IDEA additional info: Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP <+>UTF-8 =================================================================== --- core/kernel/nparser/template_cache.php (revision 15908) +++ core/kernel/nparser/template_cache.php (revision ) @@ -206,7 +206,7 @@ $fields_hash = Array ( 'VarName' => $filename, 'Data' => &$compiled_template, - 'Cached' => adodb_mktime(), + 'Cached' => time(), ); $this->Conn->doInsert($fields_hash, TABLE_PREFIX . 'SystemCache', 'REPLACE'); \ No newline at end of file Index: core/units/users/users_event_handler.php IDEA additional info: Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP <+>UTF-8 =================================================================== --- core/units/users/users_event_handler.php (revision 15908) +++ core/units/users/users_event_handler.php (revision ) @@ -939,8 +939,8 @@ $changed_fields = array_keys($object->GetChangedFields()); if ( $changed_fields && !in_array('Modified', $changed_fields) ) { - $object->SetDBField('Modified_date', adodb_mktime()); - $object->SetDBField('Modified_time', adodb_mktime()); + $object->SetDBField('Modified_date', time()); + $object->SetDBField('Modified_time', time()); } if ( !$this->Application->isAdmin && in_array('Email', $changed_fields) && ($event->Special != 'email-restore') ) { @@ -1025,7 +1025,7 @@ function OnCheckExpiredMembership($event) { // send pre-expiration reminders: begin - $pre_expiration = adodb_mktime() + $this->Application->ConfigValue('User_MembershipExpirationReminder') * 3600 * 24; + $pre_expiration = time() + $this->Application->ConfigValue('User_MembershipExpirationReminder') * 3600 * 24; $sql = 'SELECT PortalUserId, GroupId FROM '.TABLE_PREFIX.'UserGroupRelations WHERE (MembershipExpires IS NOT NULL) AND (ExpirationReminderSent = 0) AND (MembershipExpires < '.$pre_expiration.')'; @@ -1053,7 +1053,7 @@ // remove users from groups with expired membership: begin $sql = 'SELECT PortalUserId FROM '.TABLE_PREFIX.'UserGroupRelations - WHERE (MembershipExpires IS NOT NULL) AND (MembershipExpires < '.adodb_mktime().')'; + WHERE (MembershipExpires IS NOT NULL) AND (MembershipExpires < '.time().')'; $user_ids = $this->Conn->GetCol($sql); if ($user_ids) { foreach ($user_ids as $id) { @@ -1062,7 +1062,7 @@ } } $sql = 'DELETE FROM '.TABLE_PREFIX.'UserGroupRelations - WHERE (MembershipExpires IS NOT NULL) AND (MembershipExpires < '.adodb_mktime().')'; + WHERE (MembershipExpires IS NOT NULL) AND (MembershipExpires < '.time().')'; $this->Conn->Query($sql); // remove users from groups with expired membership: end } Index: core/units/visits/visits_event_handler.php IDEA additional info: Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP <+>UTF-8 =================================================================== --- core/units/visits/visits_event_handler.php (revision 15908) +++ core/units/visits/visits_event_handler.php (revision ) @@ -52,8 +52,8 @@ $object = $event->getObject(Array ('skip_autoload' => true)); /* @var $object kDBItem */ - $object->SetDBField('VisitDate_date', adodb_mktime()); - $object->SetDBField('VisitDate_time', adodb_mktime()); + $object->SetDBField('VisitDate_date', time()); + $object->SetDBField('VisitDate_time', time()); $object->SetDBField('Referer', getArrayValue($_SERVER, 'HTTP_REFERER')); $object->SetDBField('IPAddress', $this->Application->getClientIp()); \ No newline at end of file Index: core/units/helpers/mailing_list_helper.php IDEA additional info: Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP <+>UTF-8 =================================================================== --- core/units/helpers/mailing_list_helper.php (revision 15917) +++ core/units/helpers/mailing_list_helper.php (revision ) @@ -311,7 +311,7 @@ else { // send failed, increment retries counter $sql = 'UPDATE ' . $queue_table . ' - SET SendRetries = SendRetries + 1, LastSendRetry = ' . adodb_mktime() . ' + SET SendRetries = SendRetries + 1, LastSendRetry = ' . time() . ' WHERE EmailQueueId = ' . $messages[$i]['EmailQueueId']; $this->Conn->Query($sql); } \ No newline at end of file Index: core/kernel/processors/main_processor.php IDEA additional info: Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP <+>UTF-8 =================================================================== --- core/kernel/processors/main_processor.php (revision 15908) +++ core/kernel/processors/main_processor.php (revision ) @@ -1218,7 +1218,7 @@ function Timestamp($params) { $format = isset($params['format']) ? $params['format'] : 'd.m.Y H:i:s'; - return adodb_date($format); + return date($format); } function GetUrlHiddenFileds($params) Index: core/units/statistics/statistics_tag_processor.php IDEA additional info: Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP <+>UTF-8 =================================================================== --- core/units/statistics/statistics_tag_processor.php (revision 15908) +++ core/units/statistics/statistics_tag_processor.php (revision ) @@ -72,7 +72,7 @@ break; default: // simple-default postformatting - $value = adodb_date($this->PostFormatting, array_shift($values)); + $value = date($this->PostFormatting, array_shift($values)); break; } $this->PostFormatting = false; \ No newline at end of file Index: core/kernel/db/cat_event_handler.php IDEA additional info: Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP <+>UTF-8 =================================================================== --- core/kernel/db/cat_event_handler.php (revision 15908) +++ core/kernel/db/cat_event_handler.php (revision ) @@ -1026,7 +1026,7 @@ } if ( $object->GetChangedFields() ) { - $now = adodb_mktime(); + $now = time(); $object->SetDBField('Modified_date', $now); $object->SetDBField('Modified_time', $now); $object->SetDBField('ModifiedById', $this->Application->RecallVar('user_id')); @@ -1766,7 +1766,7 @@ if ($keywords[$field]) { if (in_array($keywords[$field], Array('today', 'yesterday'))) { $current_time = getdate(); - $day_begin = adodb_mktime(0, 0, 0, $current_time['mon'], $current_time['mday'], $current_time['year']); + $day_begin = mktime(0, 0, 0, $current_time['mon'], $current_time['mday'], $current_time['year']); $time_mapping = Array('today' => $day_begin, 'yesterday' => ($day_begin - 86400)); $min_time = $time_mapping[$keywords[$field]]; } @@ -1775,7 +1775,7 @@ 'last_week' => 604800, 'last_month' => 2628000, 'last_3_months' => 7884000, 'last_6_months' => 15768000, 'last_year' => 31536000, ); - $min_time = adodb_mktime() - $time_mapping[$keywords[$field]]; + $min_time = time() - $time_mapping[$keywords[$field]]; } $condition = $field_name.' > '.$min_time; } \ No newline at end of file Index: core/kernel/session/session_storage.php IDEA additional info: Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP <+>UTF-8 =================================================================== --- core/kernel/session/session_storage.php (revision 15908) +++ core/kernel/session/session_storage.php (revision ) @@ -284,7 +284,7 @@ { $sql = 'SELECT ' . $this->IDField . ' FROM ' . $this->TableName . ' - WHERE ' . $this->TimestampField . ' > ' . adodb_mktime(); + WHERE ' . $this->TimestampField . ' > ' . time(); return $this->Conn->GetCol($sql); } \ No newline at end of file Index: core/kernel/utility/logger.php IDEA additional info: Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP <+>UTF-8 =================================================================== --- core/kernel/utility/logger.php (revision 15908) +++ core/kernel/utility/logger.php (revision ) @@ -728,8 +728,8 @@ } $this->_logRecord['LogMemoryUsed'] = memory_get_usage(); - $this->_logRecord['LogTimestamp'] = adodb_mktime(); - $this->_logRecord['LogDate'] = adodb_date('Y-m-d H:i:s'); + $this->_logRecord['LogTimestamp'] = time(); + $this->_logRecord['LogDate'] = date('Y-m-d H:i:s'); if ( $storage_medium == self::LS_AUTOMATIC ) { $storage_medium = $this->Conn->connectionOpened() ? self::LS_DATABASE : self::LS_DISK; @@ -922,7 +922,7 @@ */ protected function _saveToFile($filename) { - $time = adodb_date('Y-m-d H:i:s'); + $time = date('Y-m-d H:i:s'); $log_file = new SplFileObject($filename, 'a'); return $log_file->fwrite('[' . $time . '] #' . $this->toString(null, true) . PHP_EOL) > 0; \ No newline at end of file Index: core/kernel/kbase.php IDEA additional info: Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP <+>UTF-8 =================================================================== --- core/kernel/kbase.php (revision 15908) +++ core/kernel/kbase.php (revision ) @@ -779,7 +779,7 @@ { foreach ($this->Fields as $field => $options) { if ( array_key_exists('default', $options) && $options['default'] === '#NOW#' ) { - $this->Fields[$field]['default'] = adodb_mktime(); + $this->Fields[$field]['default'] = time(); } } } Index: core/units/helpers/cron_helper.php IDEA additional info: Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP <+>UTF-8 =================================================================== --- core/units/helpers/cron_helper.php (revision 15908) +++ core/units/helpers/cron_helper.php (revision ) @@ -151,7 +151,7 @@ $short_time_format = str_replace(':s', '', $language->GetDBField('TimeFormat')); for ($i = 0; $i <= 23; $i++) { - $ret[$i] = adodb_date($short_time_format, adodb_mktime($i, 0, 0)) . ' (' . $i . ')'; + $ret[$i] = date($short_time_format, mktime($i, 0, 0)) . ' (' . $i . ')'; } } elseif ( $field_type == self::DAY ) { @@ -324,7 +324,7 @@ $date = TIMENOW; } - $next_run = strtotime('-' . (int)adodb_date('s', $date) . ' seconds', $date); + $next_run = strtotime('-' . (int)date('s', $date) . ' seconds', $date); $expression_parts = explode(' ', $expression); $cron_field = new kCronField(); @@ -570,7 +570,7 @@ $mapping[$field_type] = in_array(7, str_split($rule)) ? 'N' : 'w'; } - return (int)adodb_date($mapping[$field_type], $date); + return (int)date($mapping[$field_type], $date); } /** @@ -658,22 +658,22 @@ { if ( $field_type == kCronHelper::MONTH || $field_type == kCronHelper::WEEKDAY || $field_type == kCronHelper::DAY ) { if ( $inverse ) { - $date = strtotime(adodb_date('Y-m-d 23:59:59', $date)); + $date = strtotime(date('Y-m-d 23:59:59', $date)); // set time 23:59:00 } else { // set time 00:00:00 - $date = strtotime(adodb_date('Y-m-d 00:00:00', $date)); + $date = strtotime(date('Y-m-d 00:00:00', $date)); } } elseif ( $field_type == kCronHelper::HOUR ) { if ( $inverse ) { // set time :59:00 - $date = strtotime(adodb_date('Y-m-d H:59:59', $date)); + $date = strtotime(date('Y-m-d H:59:59', $date)); } else { // set time :00:00 - $date = strtotime(adodb_date('Y-m-d H:00:00', $date)); + $date = strtotime(date('Y-m-d H:00:00', $date)); } } \ No newline at end of file Index: core/units/phrases/phrases_event_handler.php IDEA additional info: Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP <+>UTF-8 =================================================================== --- core/units/phrases/phrases_event_handler.php (revision 15908) +++ core/units/phrases/phrases_event_handler.php (revision ) @@ -346,8 +346,8 @@ $object->SetDBField('PhraseType', $this->_getPhraseType($label)); if ( $this->translationChanged($object) ) { - $object->SetDBField('LastChanged_date', adodb_mktime() ); - $object->SetDBField('LastChanged_time', adodb_mktime() ); + $object->SetDBField('LastChanged_date', time() ); + $object->SetDBField('LastChanged_time', time() ); $object->SetDBField('LastChangeIP', $this->Application->getClientIp()); } \ No newline at end of file Index: core/units/helpers/user_helper.php IDEA additional info: Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP <+>UTF-8 =================================================================== --- core/units/helpers/user_helper.php (revision 15908) +++ core/units/helpers/user_helper.php (revision ) @@ -181,7 +181,7 @@ // don't change last login time when auto-login is used $this_login = (int)$this->Application->RecallPersistentVar('ThisLogin'); $this->Application->StorePersistentVar('LastLogin', $this_login); - $this->Application->StorePersistentVar('ThisLogin', adodb_mktime()); + $this->Application->StorePersistentVar('ThisLogin', time()); } $hook_event = new kEvent('u:OnAfterLogin'); \ No newline at end of file Index: core/units/helpers/deployment_helper.php IDEA additional info: Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP <+>UTF-8 =================================================================== --- core/units/helpers/deployment_helper.php (revision 15908) +++ core/units/helpers/deployment_helper.php (revision ) @@ -188,7 +188,7 @@ $ret = true; $this->dryRun = $dry_run; - $this->toLog(PHP_EOL . '[' . adodb_date('Y-m-d H:i:s') . '] === ' . $this->ip . ' ==='); + $this->toLog(PHP_EOL . '[' . date('Y-m-d H:i:s') . '] === ' . $this->ip . ' ==='); foreach ($this->Application->ModuleInfo as $module_name => $module_info) { $this->moduleName = $module_name; \ No newline at end of file Index: core/kernel/utility/temp_handler.php IDEA additional info: Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP <+>UTF-8 =================================================================== --- core/kernel/utility/temp_handler.php (revision 15908) +++ core/kernel/utility/temp_handler.php (revision ) @@ -133,7 +133,7 @@ // mark, that we are coping from temp to live right now, so other similar attempt (from another script) will fail $fields_hash = Array ( 'SessionKey' => $this->Application->GetSID(), - 'Timestamp' => adodb_mktime(), + 'Timestamp' => time(), 'MainPrefix' => $this->_tables->getPrefix(), ); \ No newline at end of file Index: core/kernel/managers/cache_manager.php IDEA additional info: Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP <+>UTF-8 =================================================================== --- core/kernel/managers/cache_manager.php (revision 15917) +++ core/kernel/managers/cache_manager.php (revision ) @@ -158,7 +158,7 @@ if ($update) { $fields_hash = Array ( 'PhraseList' => implode(',', $this->Application->Phrases->Ids), - 'CacheDate' => adodb_mktime(), + 'CacheDate' => time(), 'Template' => md5( $this->getCacheKey() ), 'ConfigVariables' => implode(',', array_unique($this->configIDs)), ); @@ -340,7 +340,7 @@ $this->getToCache() ); - $cache_rebuild_by = SERVER_NAME . ' (' . $this->Application->getClientIp() . ') - ' . adodb_date('d/m/Y H:i:s'); + $cache_rebuild_by = SERVER_NAME . ' (' . $this->Application->getClientIp() . ') - ' . date('d/m/Y H:i:s'); if ($this->Application->isCachingType(CACHING_TYPE_MEMORY)) { $this->Application->setCache('master:configs_parsed', serialize($cache)); @@ -650,7 +650,7 @@ $lifetime = (int)$cached_data[$name]['LifeTime']; // in seconds - if ( ($lifetime > 0) && ($cached_data[$name]['Cached'] + $lifetime < adodb_mktime()) ) { + if ( ($lifetime > 0) && ($cached_data[$name]['Cached'] + $lifetime < time()) ) { // delete expired $this->Conn->nextQueryCachable = true; @@ -704,7 +704,7 @@ $fields_hash = Array ( 'VarName' => $name, 'Data' => &$value, - 'Cached' => adodb_mktime(), + 'Cached' => time(), 'LifeTime' => (int)$expiration, ); \ No newline at end of file Index: core/kernel/session/inp_session_storage.php IDEA additional info: Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP <+>UTF-8 =================================================================== --- core/kernel/session/inp_session_storage.php (revision 15908) +++ core/kernel/session/inp_session_storage.php (revision ) @@ -40,7 +40,7 @@ function UpdateSession($timeout = 0) { - $time = adodb_mktime(); + $time = time(); // Update LastAccessed only if it's newer than 1/10 of session timeout - perfomance optimization to eliminate needless updates on every click // if ($time - $this->DirectVars['LastAccessed'] > $this->SessionTimeout/10) { $this->SetField($this->TimestampField, $time + $this->SessionTimeout); @@ -68,7 +68,7 @@ function GetExpiredSIDs() { - $query = ' SELECT '.$this->IDField.' FROM '.$this->TableName.' WHERE '.$this->TimestampField.' < '.(adodb_mktime()); + $query = ' SELECT '.$this->IDField.' FROM '.$this->TableName.' WHERE '.$this->TimestampField.' < '.(time()); $ret = $this->Conn->GetCol($query); if($ret) { $this->DeleteEditTables(); \ No newline at end of file Index: core/kernel/utility/email_send.php IDEA additional info: Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP <+>UTF-8 =================================================================== --- core/kernel/utility/email_send.php (revision 15908) +++ core/kernel/utility/email_send.php (revision ) @@ -2052,7 +2052,7 @@ $fields_hash = Array ( 'ToEmail' => $message_headers['To'], 'Subject' => $message_headers['Subject'], - 'Queued' => adodb_mktime(), + 'Queued' => time(), 'SendRetries' => 0, 'LastSendRetry' => 0, 'MailingId' => (int)$immediate_send, \ No newline at end of file Index: core/kernel/utility/adodb-time.inc.php =================================================================== --- core/kernel/utility/adodb-time.inc.php (revision 15908) +++ core/kernel/utility/adodb-time.inc.php (revision 15908) @@ -1,767 +0,0 @@ -$y1 error, expected=$y1-$m-$d 00:00:00, adodb=$rez
"; - return false; - } - return true; -} - -function adodb_date_test_strftime($fmt) -{ - $s1 = strftime($fmt); - $s2 = adodb_strftime($fmt); - - if ($s1 == $s2) return true; - - echo "error for $fmt, strftime=$s1, $adodb=$s2
"; - return false; -} - -/** - Returns day of week, 0 = Sunday,... 6=Saturday. - Algorithm from PEAR::Date_Calc -*/ -function adodb_dow($year, $month, $day) -{ -/* -Pope Gregory removed 10 days - October 5 to October 14 - from the year 1582 and -proclaimed that from that time onwards 3 days would be dropped from the calendar -every 400 years. - -Thursday, October 4, 1582 (Julian) was followed immediately by Friday, October 15, 1582 (Gregorian). -*/ - if ($year <= 1582) { - if ($year < 1582 || - ($year == 1582 && ($month < 10 || ($month == 10 && $day < 15)))) $greg_correction = 3; - else - $greg_correction = 0; - } else - $greg_correction = 0; - - if($month > 2) - $month -= 2; - else { - $month += 10; - $year--; - } - - $day = floor((13 * $month - 1) / 5) + - $day + ($year % 100) + - floor(($year % 100) / 4) + - floor(($year / 100) / 4) - 2 * - floor($year / 100) + 77 + $greg_correction; - - return $day - 7 * floor($day / 7); -} - - -/** - Checks for leap year, returns true if it is. No 2-digit year check. Also - handles julian calendar correctly. -*/ -function _adodb_is_leap_year($year) -{ - if ($year % 4 != 0) return false; - - if ($year % 400 == 0) { - return true; - // if gregorian calendar (>1582), century not-divisible by 400 is not leap - } else if ($year > 1582 && $year % 100 == 0 ) { - return false; - } - - return true; -} - - -/** - checks for leap year, returns true if it is. Has 2-digit year check -*/ -function adodb_is_leap_year($year) -{ - return _adodb_is_leap_year(adodb_year_digit_check($year)); -} - -/** - Fix 2-digit years. Works for any century. - Assumes that if 2-digit is more than 30 years in future, then previous century. -*/ -function adodb_year_digit_check($y) -{ - if ($y < 100) { - - $yr = (integer) date("Y"); - $century = (integer) ($yr /100); - - if ($yr%100 > 50) { - $c1 = $century + 1; - $c0 = $century; - } else { - $c1 = $century; - $c0 = $century - 1; - } - $c1 *= 100; - // if 2-digit year is less than 30 years in future, set it to this century - // otherwise if more than 30 years in future, then we set 2-digit year to the prev century. - if (($y + $c1) < $yr+30) $y = $y + $c1; - else $y = $y + $c0*100; - } - return $y; -} - -/** - get local time zone offset from GMT -*/ -function adodb_get_gmt_diff() -{ - static $TZ; - - if ( isset($TZ) ) { - return $TZ; - } - - if ( version_compare(PHP_VERSION, '5.1.0', '<') ) { - $TZ = mktime(0,0,0,1,2,1970,0) - gmmktime(0,0,0,1,2,1970,0); - } - else { - $TZ = (-1) * date('Z', mktime(0, 0, 0, 1, 1, 1970)); - } - - return $TZ; -} - -/** - Returns an array with date info. -*/ -function adodb_getdate($d=false,$fast=false) -{ - if ($d === false) return getdate(); - if (!defined('ADODB_TEST_DATES')) { - if ((abs($d) <= 0x7FFFFFFF)) { // check if number in 32-bit signed range - if (!defined('ADODB_NO_NEGATIVE_TS') || $d >= 0) // if windows, must be +ve integer - return @getdate($d); - } - } - return _adodb_getdate($d); -} - - -/** - Low-level function that returns the getdate() array. We have a special - $fast flag, which if set to true, will return fewer array values, - and is much faster as it does not calculate dow, etc. -*/ -function _adodb_getdate($origd=false,$fast=false,$is_gmt=false) -{ -static $YRS; - - $d = $origd - ($is_gmt ? 0 : adodb_get_gmt_diff()); - - $_day_power = 86400; - $_hour_power = 3600; - $_min_power = 60; - - if ($d < -12219321600) $d -= 86400*10; // if 15 Oct 1582 or earlier, gregorian correction - - $_month_table_normal = array("",31,28,31,30,31,30,31,31,30,31,30,31); - $_month_table_leaf = array("",31,29,31,30,31,30,31,31,30,31,30,31); - - $d366 = $_day_power * 366; - $d365 = $_day_power * 365; - - if ($d < 0) { - - if (empty($YRS)) $YRS = array( - 1970 => 0, - 1960 => -315619200, - 1950 => -631152000, - 1940 => -946771200, - 1930 => -1262304000, - 1920 => -1577923200, - 1910 => -1893456000, - 1900 => -2208988800, - 1890 => -2524521600, - 1880 => -2840140800, - 1870 => -3155673600, - 1860 => -3471292800, - 1850 => -3786825600, - 1840 => -4102444800, - 1830 => -4417977600, - 1820 => -4733596800, - 1810 => -5049129600, - 1800 => -5364662400, - 1790 => -5680195200, - 1780 => -5995814400, - 1770 => -6311347200, - 1760 => -6626966400, - 1750 => -6942499200, - 1740 => -7258118400, - 1730 => -7573651200, - 1720 => -7889270400, - 1710 => -8204803200, - 1700 => -8520336000, - 1690 => -8835868800, - 1680 => -9151488000, - 1670 => -9467020800, - 1660 => -9782640000, - 1650 => -10098172800, - 1640 => -10413792000, - 1630 => -10729324800, - 1620 => -11044944000, - 1610 => -11360476800, - 1600 => -11676096000); - - if ($is_gmt) $origd = $d; - // The valid range of a 32bit signed timestamp is typically from - // Fri, 13 Dec 1901 20:45:54 GMT to Tue, 19 Jan 2038 03:14:07 GMT - // - - # old algorithm iterates through all years. new algorithm does it in - # 10 year blocks - - /* - # old algo - for ($a = 1970 ; --$a >= 0;) { - $lastd = $d; - - if ($leaf = _adodb_is_leap_year($a)) $d += $d366; - else $d += $d365; - - if ($d >= 0) { - $year = $a; - break; - } - } - */ - - $lastsecs = 0; - $lastyear = 1970; - foreach($YRS as $year => $secs) { - if ($d >= $secs) { - $a = $lastyear; - break; - } - $lastsecs = $secs; - $lastyear = $year; - } - - $d -= $lastsecs; - if (!isset($a)) $a = $lastyear; - - //echo ' yr=',$a,' ', $d,'.'; - - for (; --$a >= 0;) { - $lastd = $d; - - if ($leaf = _adodb_is_leap_year($a)) $d += $d366; - else $d += $d365; - - if ($d >= 0) { - $year = $a; - break; - } - } - /**/ - - $secsInYear = 86400 * ($leaf ? 366 : 365) + $lastd; - - $d = $lastd; - $mtab = ($leaf) ? $_month_table_leaf : $_month_table_normal; - for ($a = 13 ; --$a > 0;) { - $lastd = $d; - $d += $mtab[$a] * $_day_power; - if ($d >= 0) { - $month = $a; - $ndays = $mtab[$a]; - break; - } - } - - $d = $lastd; - $day = $ndays + ceil(($d+1) / ($_day_power)); - - $d += ($ndays - $day+1)* $_day_power; - $hour = floor($d/$_hour_power); - - } else { - for ($a = 1970 ;; $a++) { - $lastd = $d; - - if ($leaf = _adodb_is_leap_year($a)) $d -= $d366; - else $d -= $d365; - if ($d < 0) { - $year = $a; - break; - } - } - $secsInYear = $lastd; - $d = $lastd; - $mtab = ($leaf) ? $_month_table_leaf : $_month_table_normal; - for ($a = 1 ; $a <= 12; $a++) { - $lastd = $d; - $d -= $mtab[$a] * $_day_power; - if ($d < 0) { - $month = $a; - $ndays = $mtab[$a]; - break; - } - } - $d = $lastd; - $day = ceil(($d+1) / $_day_power); - $d = $d - ($day-1) * $_day_power; - $hour = floor($d /$_hour_power); - } - - $d -= $hour * $_hour_power; - $min = floor($d/$_min_power); - $secs = $d - $min * $_min_power; - if ($fast) { - return array( - 'seconds' => $secs, - 'minutes' => $min, - 'hours' => $hour, - 'mday' => $day, - 'mon' => $month, - 'year' => $year, - 'yday' => floor($secsInYear/$_day_power), - 'leap' => $leaf, - 'ndays' => $ndays - ); - } - - - $dow = adodb_dow($year,$month,$day); - - return array( - 'seconds' => $secs, - 'minutes' => $min, - 'hours' => $hour, - 'mday' => $day, - 'wday' => $dow, - 'mon' => $month, - 'year' => $year, - 'yday' => floor($secsInYear/$_day_power), - 'weekday' => gmdate('l',$_day_power*(3+$dow)), - 'month' => gmdate('F',mktime(0,0,0,$month,2,1971)), - 0 => $origd - ); -} - -function adodb_gmdate($fmt,$d=false) -{ - return adodb_date($fmt,$d,true); -} - -// accepts unix timestamp and iso date format in $d -function adodb_date2($fmt, $d=false, $is_gmt=false) -{ - if ($d !== false) { - if (!preg_match( - "|^([0-9]{4})[-/\.]?([0-9]{1,2})[-/\.]?([0-9]{1,2})[ -]?(([0-9]{1,2}):?([0-9]{1,2}):?([0-9\.]{1,4}))?|", - ($d), $rr)) return adodb_date($fmt,false,$is_gmt); - - if ($rr[1] <= 100 && $rr[2]<= 1) return adodb_date($fmt,false,$is_gmt); - - // h-m-s-MM-DD-YY - if (!isset($rr[5])) $d = adodb_mktime(0,0,0,$rr[2],$rr[3],$rr[1]); - else $d = @adodb_mktime($rr[5],$rr[6],$rr[7],$rr[2],$rr[3],$rr[1]); - } - - return adodb_date($fmt,$d,$is_gmt); -} - - -/** - Return formatted date based on timestamp $d -*/ -function adodb_date($fmt,$d=false,$is_gmt=false) -{ -static $daylight; - - if ($d === false) return ($is_gmt)? @gmdate($fmt): @date($fmt); - if (!defined('ADODB_TEST_DATES')) { - if ((abs($d) <= 0x7FFFFFFF)) { // check if number in 32-bit signed range - if (!defined('ADODB_NO_NEGATIVE_TS') || $d >= 0) // if windows, must be +ve integer - return ($is_gmt)? @gmdate($fmt,$d): @date($fmt,$d); - - } - } - $_day_power = 86400; - - $arr = _adodb_getdate($d,true,$is_gmt); - - if (!isset($daylight)) $daylight = function_exists('adodb_daylight_sv'); - if ($daylight) adodb_daylight_sv($arr, $is_gmt); - - $year = $arr['year']; - $month = $arr['mon']; - $day = $arr['mday']; - $hour = $arr['hours']; - $min = $arr['minutes']; - $secs = $arr['seconds']; - - $max = strlen($fmt); - $dates = ''; - - /* - at this point, we have the following integer vars to manipulate: - $year, $month, $day, $hour, $min, $secs - */ - for ($i=0; $i < $max; $i++) { - switch($fmt[$i]) { - case 'T': $dates .= date('T');break; - // YEAR - case 'L': $dates .= $arr['leap'] ? '1' : '0'; break; - case 'r': // Thu, 21 Dec 2000 16:01:07 +0200 - - // 4.3.11 uses '04 Jun 2004' - // 4.3.8 uses ' 4 Jun 2004' - $dates .= gmdate('D',$_day_power*(3+adodb_dow($year,$month,$day))).', ' - . ($day<10?'0'.$day:$day) . ' '.date('M',mktime(0,0,0,$month,2,1971)).' '.$year.' '; - - if ($hour < 10) $dates .= '0'.$hour; else $dates .= $hour; - - if ($min < 10) $dates .= ':0'.$min; else $dates .= ':'.$min; - - if ($secs < 10) $dates .= ':0'.$secs; else $dates .= ':'.$secs; - - $gmt = adodb_get_gmt_diff(); - $dates .= sprintf(' %s%04d',($gmt<0)?'+':'-',abs($gmt)/36); break; - - case 'Y': $dates .= $year; break; - case 'y': $dates .= substr($year,strlen($year)-2,2); break; - // MONTH - case 'm': if ($month<10) $dates .= '0'.$month; else $dates .= $month; break; - case 'Q': $dates .= ($month+3)>>2; break; - case 'n': $dates .= $month; break; - case 'M': $dates .= date('M',mktime(0,0,0,$month,2,1971)); break; - case 'F': $dates .= date('F',mktime(0,0,0,$month,2,1971)); break; - // DAY - case 't': $dates .= $arr['ndays']; break; - case 'z': $dates .= $arr['yday']; break; - case 'w': $dates .= adodb_dow($year,$month,$day); break; - case 'l': $dates .= gmdate('l',$_day_power*(3+adodb_dow($year,$month,$day))); break; - case 'D': $dates .= gmdate('D',$_day_power*(3+adodb_dow($year,$month,$day))); break; - case 'j': $dates .= $day; break; - case 'd': if ($day<10) $dates .= '0'.$day; else $dates .= $day; break; - case 'S': - $d10 = $day % 10; - if ($d10 == 1) $dates .= 'st'; - else if ($d10 == 2 && $day != 12) $dates .= 'nd'; - else if ($d10 == 3) $dates .= 'rd'; - else $dates .= 'th'; - break; - - // HOUR - case 'Z': - $dates .= ($is_gmt) ? 0 : -adodb_get_gmt_diff(); break; - case 'O': - $gmt = ($is_gmt) ? 0 : adodb_get_gmt_diff(); - $dates .= sprintf('%s%04d',($gmt<0)?'+':'-',abs($gmt)/36); break; - - case 'H': - if ($hour < 10) $dates .= '0'.$hour; - else $dates .= $hour; - break; - case 'h': - if ($hour > 12) $hh = $hour - 12; - else { - if ($hour == 0) $hh = '12'; - else $hh = $hour; - } - - if ($hh < 10) $dates .= '0'.$hh; - else $dates .= $hh; - break; - - case 'G': - $dates .= $hour; - break; - - case 'g': - if ($hour > 12) $hh = $hour - 12; - else { - if ($hour == 0) $hh = '12'; - else $hh = $hour; - } - $dates .= $hh; - break; - // MINUTES - case 'i': if ($min < 10) $dates .= '0'.$min; else $dates .= $min; break; - // SECONDS - case 'U': $dates .= $d; break; - case 's': if ($secs < 10) $dates .= '0'.$secs; else $dates .= $secs; break; - // AM/PM - // Note 00:00 to 11:59 is AM, while 12:00 to 23:59 is PM - case 'a': - if ($hour>=12) $dates .= 'pm'; - else $dates .= 'am'; - break; - case 'A': - if ($hour>=12) $dates .= 'PM'; - else $dates .= 'AM'; - break; - default: - $dates .= $fmt[$i]; break; - // ESCAPE - case "\\": - $i++; - if ($i < $max) $dates .= $fmt[$i]; - break; - } - } - return $dates; -} - -/** - Returns a timestamp given a GMT/UTC time. - Note that $is_dst is not implemented and is ignored. -*/ -function adodb_gmmktime($hr,$min,$sec,$mon=false,$day=false,$year=false,$is_dst=false) -{ - return adodb_mktime($hr,$min,$sec,$mon,$day,$year,$is_dst,true); -} - -/** - Return a timestamp given a local time. Originally by jackbbs. - Note that $is_dst is not implemented and is ignored. - - Not a very fast algorithm - O(n) operation. Could be optimized to O(1). -*/ -function adodb_mktime($hr = null, $min = null, $sec = null, $mon = null, $day = null, $year = null,$is_dst=false,$is_gmt=false) -{ - if( !isset($hr) ) $hr = adodb_date('H'); - if( !isset($min) ) $min = adodb_date('i'); - if( !isset($sec) ) $sec = adodb_date('s'); - if( !isset($mon) ) $mon = adodb_date('m'); - if( !isset($day) ) $day = adodb_date('d'); - if( !isset($year) ) $year = adodb_date('Y'); - - if (!defined('ADODB_TEST_DATES')) { - - if ($mon === false || !isset($mon) ) { - return $is_gmt? @gmmktime($hr,$min,$sec): @mktime($hr,$min,$sec); - } - - // for windows, we don't check 1970 because with timezone differences, - // 1 Jan 1970 could generate negative timestamp, which is illegal - if (1971 < $year && $year < 2038 - || !defined('ADODB_NO_NEGATIVE_TS') && (1901 < $year && $year < 2038) - ) { - return $is_gmt ? - @gmmktime($hr,$min,$sec,$mon,$day,$year): - @mktime($hr,$min,$sec,$mon,$day,$year); - } - } - - $gmt_different = ($is_gmt) ? 0 : adodb_get_gmt_diff(); - - /* - # disabled because some people place large values in $sec. - # however we need it for $mon because we use an array... - $hr = intval($hr); - $min = intval($min); - $sec = intval($sec); - */ - $mon = intval($mon); - $day = intval($day); - $year = intval($year); - - - $year = adodb_year_digit_check($year); - - if ($mon > 12) { - $y = floor($mon / 12); - $year += $y; - $mon -= $y*12; - } else if ($mon < 1) { - $y = ceil((1-$mon) / 12); - $year -= $y; - $mon += $y*12; - } - - $_day_power = 86400; - $_hour_power = 3600; - $_min_power = 60; - - $_month_table_normal = array("",31,28,31,30,31,30,31,31,30,31,30,31); - $_month_table_leaf = array("",31,29,31,30,31,30,31,31,30,31,30,31); - - $_total_date = 0; - if ($year >= 1970) { - for ($a = 1970 ; $a <= $year; $a++) { - $leaf = _adodb_is_leap_year($a); - if ($leaf == true) { - $loop_table = $_month_table_leaf; - $_add_date = 366; - } else { - $loop_table = $_month_table_normal; - $_add_date = 365; - } - if ($a < $year) { - $_total_date += $_add_date; - } else { - for($b=1;$b<$mon;$b++) { - $_total_date += $loop_table[$b]; - } - } - } - $_total_date +=$day-1; - $ret = $_total_date * $_day_power + $hr * $_hour_power + $min * $_min_power + $sec + $gmt_different; - - } else { - for ($a = 1969 ; $a >= $year; $a--) { - $leaf = _adodb_is_leap_year($a); - if ($leaf == true) { - $loop_table = $_month_table_leaf; - $_add_date = 366; - } else { - $loop_table = $_month_table_normal; - $_add_date = 365; - } - if ($a > $year) { $_total_date += $_add_date; - } else { - for($b=12;$b>$mon;$b--) { - $_total_date += $loop_table[$b]; - } - } - } - $_total_date += $loop_table[$mon] - $day; - - $_day_time = $hr * $_hour_power + $min * $_min_power + $sec; - $_day_time = $_day_power - $_day_time; - $ret = -( $_total_date * $_day_power + $_day_time - $gmt_different); - if ($ret < -12220185600) $ret += 10*86400; // if earlier than 5 Oct 1582 - gregorian correction - else if ($ret < -12219321600) $ret = -12219321600; // if in limbo, reset to 15 Oct 1582. - } - //print " dmy=$day/$mon/$year $hr:$min:$sec => " .$ret; - return $ret; -} - -function adodb_gmstrftime($fmt, $ts=false) -{ - return adodb_strftime($fmt,$ts,true); -} - -// hack - convert to adodb_date -function adodb_strftime($fmt, $ts=false,$is_gmt=false) -{ -global $ADODB_DATE_LOCALE; - - if (!defined('ADODB_TEST_DATES')) { - if ((abs($ts) <= 0x7FFFFFFF)) { // check if number in 32-bit signed range - if (!defined('ADODB_NO_NEGATIVE_TS') || $ts >= 0) // if windows, must be +ve integer - return ($is_gmt)? @gmstrftime($fmt,$ts): @strftime($fmt,$ts); - - } - } - - if (empty($ADODB_DATE_LOCALE)) { - $tstr = strtoupper(gmstrftime('%c',31366800)); // 30 Dec 1970, 1 am - $sep = substr($tstr,2,1); - $hasAM = strrpos($tstr,'M') !== false; - - $ADODB_DATE_LOCALE = array(); - $ADODB_DATE_LOCALE[] = strncmp($tstr,'30',2) == 0 ? 'd'.$sep.'m'.$sep.'y' : 'm'.$sep.'d'.$sep.'y'; - $ADODB_DATE_LOCALE[] = ($hasAM) ? 'h:i:s a' : 'H:i:s'; - - } - $inpct = false; - $fmtdate = ''; - for ($i=0,$max = strlen($fmt); $i < $max; $i++) { - $ch = $fmt[$i]; - if ($ch == '%') { - if ($inpct) { - $fmtdate .= '%'; - $inpct = false; - } else - $inpct = true; - } else if ($inpct) { - - $inpct = false; - switch($ch) { - case '0': - case '1': - case '2': - case '3': - case '4': - case '5': - case '6': - case '7': - case '8': - case '9': - case 'E': - case 'O': - /* ignore format modifiers */ - $inpct = true; - break; - - case 'a': $fmtdate .= 'D'; break; - case 'A': $fmtdate .= 'l'; break; - case 'h': - case 'b': $fmtdate .= 'M'; break; - case 'B': $fmtdate .= 'F'; break; - case 'c': $fmtdate .= $ADODB_DATE_LOCALE[0].$ADODB_DATE_LOCALE[1]; break; - case 'C': $fmtdate .= '\C?'; break; // century - case 'd': $fmtdate .= 'd'; break; - case 'D': $fmtdate .= 'm/d/y'; break; - case 'e': $fmtdate .= 'j'; break; - case 'g': $fmtdate .= '\g?'; break; //? - case 'G': $fmtdate .= '\G?'; break; //? - case 'H': $fmtdate .= 'H'; break; - case 'I': $fmtdate .= 'h'; break; - case 'j': $fmtdate .= '?z'; $parsej = true; break; // wrong as j=1-based, z=0-basd - case 'm': $fmtdate .= 'm'; break; - case 'M': $fmtdate .= 'i'; break; - case 'n': $fmtdate .= "\n"; break; - case 'p': $fmtdate .= 'a'; break; - case 'r': $fmtdate .= 'h:i:s a'; break; - case 'R': $fmtdate .= 'H:i:s'; break; - case 'S': $fmtdate .= 's'; break; - case 't': $fmtdate .= "\t"; break; - case 'T': $fmtdate .= 'H:i:s'; break; - case 'u': $fmtdate .= '?u'; $parseu = true; break; // wrong strftime=1-based, date=0-basde - case 'U': $fmtdate .= '?U'; $parseU = true; break;// wrong strftime=1-based, date=0-based - case 'x': $fmtdate .= $ADODB_DATE_LOCALE[0]; break; - case 'X': $fmtdate .= $ADODB_DATE_LOCALE[1]; break; - case 'w': $fmtdate .= '?w'; $parseu = true; break; // wrong strftime=1-based, date=0-basde - case 'W': $fmtdate .= '?W'; $parseU = true; break;// wrong strftime=1-based, date=0-based - case 'y': $fmtdate .= 'y'; break; - case 'Y': $fmtdate .= 'Y'; break; - case 'Z': $fmtdate .= 'T'; break; - } - } else if (('A' <= ($ch) && ($ch) <= 'Z' ) || ('a' <= ($ch) && ($ch) <= 'z' )) - $fmtdate .= "\\".$ch; - else - $fmtdate .= $ch; - } - //echo "fmt=",$fmtdate,"
"; - if ($ts === false) $ts = time(); - $ret = adodb_date($fmtdate, $ts, $is_gmt); - return $ret; -} \ No newline at end of file Index: core/units/helpers/minifiers/minify_helper.php IDEA additional info: Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP <+>UTF-8 =================================================================== --- core/units/helpers/minifiers/minify_helper.php (revision 15908) +++ core/units/helpers/minifiers/minify_helper.php (revision ) @@ -128,7 +128,7 @@ $file_helper = $this->Application->recallObject('FileHelper'); /* @var $file_helper FileHelper */ - return $file_helper->pathToUrl($dst_file) . '?ts=' . adodb_date('Y-m-d_H:i:s', filemtime($dst_file)); + return $file_helper->pathToUrl($dst_file) . '?ts=' . date('Y-m-d_H:i:s', filemtime($dst_file)); } /** \ No newline at end of file Index: core/units/content/content_eh.php IDEA additional info: Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP <+>UTF-8 =================================================================== --- core/units/content/content_eh.php (revision 15908) +++ core/units/content/content_eh.php (revision ) @@ -149,8 +149,8 @@ $updated = $object->Update(); if ( $updated ) { - $revision->SetDBField('AutoSavedOn_date', adodb_mktime()); - $revision->SetDBField('AutoSavedOn_time', adodb_mktime()); + $revision->SetDBField('AutoSavedOn_date', time()); + $revision->SetDBField('AutoSavedOn_time', time()); $revision->Update(); } \ No newline at end of file Index: core/units/categories/categories_tag_processor.php IDEA additional info: Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP <+>UTF-8 =================================================================== --- core/units/categories/categories_tag_processor.php (revision 15908) +++ core/units/categories/categories_tag_processor.php (revision ) @@ -24,7 +24,7 @@ if ( isset($params['today']) && $params['today'] ) { $sql = 'SELECT COUNT(*) FROM ' . $object->TableName . ' - WHERE (ParentPath LIKE "' . $object->GetDBField('ParentPath') . '%") AND (CreatedOn > ' . (adodb_mktime() - 86400) . ')'; + WHERE (ParentPath LIKE "' . $object->GetDBField('ParentPath') . '%") AND (CreatedOn > ' . (time() - 86400) . ')'; return $this->Conn->GetOne($sql) - 1; } @@ -865,7 +865,7 @@ } } - return adodb_date($format, $date); + return date($format, $date); } function CategoryItemCount($params) \ No newline at end of file Index: core/kernel/startup.php IDEA additional info: Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP <+>UTF-8 =================================================================== --- core/kernel/startup.php (revision 15908) +++ core/kernel/startup.php (revision ) @@ -195,10 +195,6 @@ $debugger->AttachToApplication(); } - if( !function_exists('adodb_mktime') ) { - include_once(KERNEL_PATH . '/utility/adodb-time.inc.php'); - } - // system users define('USER_ROOT', -1); define('USER_GUEST', -2); \ No newline at end of file Index: core/kernel/db/db_load_balancer.php IDEA additional info: Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP <+>UTF-8 =================================================================== --- core/kernel/db/db_load_balancer.php (revision 15908) +++ core/kernel/db/db_load_balancer.php (revision ) @@ -354,7 +354,7 @@ if ( $times ) { // randomly recache with probability rising over $expiry - $elapsed = adodb_mktime() - $times['timestamp']; + $elapsed = time() - $times['timestamp']; $chance = max(0, ($expiry - $elapsed) * $request_rate); if ( mt_rand(0, $chance) != 0 ) { @@ -382,7 +382,7 @@ } // add a timestamp key so we know when it was cached - $times['timestamp'] = adodb_mktime(); + $times['timestamp'] = time(); $this->Application->setCache($cache_key, $times, $expiry); // but don't give the timestamp to the caller Index: core/units/helpers/rating_helper.php IDEA additional info: Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP <+>UTF-8 =================================================================== --- core/units/helpers/rating_helper.php (revision 15908) +++ core/units/helpers/rating_helper.php (revision ) @@ -192,7 +192,7 @@ 'ItemId' => $object->GetID(), 'RatingValue' => $rating, 'IPAddress' => $this->Application->getClientIp(), - 'CreatedOn' => adodb_mktime(), + 'CreatedOn' => time(), ); $this->Conn->doInsert($fields_hash, TABLE_PREFIX.'CatalogRatings'); @@ -219,7 +219,7 @@ /*function purgeVotes() { - $expired = adodb_mktime() - 86400 * $this->Application->ConfigValue('Timeout_Rating'); // 3600 + $expired = time() - 86400 * $this->Application->ConfigValue('Timeout_Rating'); // 3600 $sql = 'DELETE FROM ' . TABLE_PREFIX . 'CatalogRatings WHERE CreatedOn < ' . $expired; \ No newline at end of file Index: core/units/helpers/search_helper.php IDEA additional info: Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP <+>UTF-8 =================================================================== --- core/units/helpers/search_helper.php (revision 15908) +++ core/units/helpers/search_helper.php (revision ) @@ -686,8 +686,8 @@ $time_format = $this->_getInputTimeFormat($options); if ( $time_format ) { // time is missing, but time format available -> guess time and add to date - $time = ($type == 'from') ? adodb_mktime(0, 0, 0) : adodb_mktime(23, 59, 59); - $time = adodb_date($time_format, $time); + $time = ($type == 'from') ? mktime(0, 0, 0) : mktime(23, 59, 59); + $time = date($time_format, $time); $value[$type] .= $dt_separator . $time; } } \ No newline at end of file Index: core/kernel/application.php IDEA additional info: Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP <+>UTF-8 =================================================================== --- core/kernel/application.php (revision 15917) +++ core/kernel/application.php (revision ) @@ -1247,7 +1247,7 @@ $this->_updateAverageStatistics($data, 'SqlCount', $query_statistics['count']); $data['Hits']++; - $data['LastHit'] = adodb_mktime(); + $data['LastHit'] = time(); $this->Conn->doUpdate($data, TABLE_PREFIX . 'StatisticsCapture', 'StatisticsId = ' . $data['StatisticsId']); } @@ -1257,7 +1257,7 @@ $data['SqlCountMin'] = $data['SqlCountAvg'] = $data['SqlCountMax'] = $query_statistics['count']; $data['TemplateName'] = $this->GetVar('t'); $data['Hits'] = 1; - $data['LastHit'] = adodb_mktime(); + $data['LastHit'] = time(); $this->Conn->doInsert($data, TABLE_PREFIX . 'StatisticsCapture'); } } @@ -1309,7 +1309,7 @@ $data['TemplateNames'] = implode(',', array_unique($template_names)); $data['Hits']++; - $data['LastHit'] = adodb_mktime(); + $data['LastHit'] = time(); $this->Conn->doUpdate($data, TABLE_PREFIX . 'SlowSqlCapture', 'CaptureId = ' . $data['CaptureId']); } @@ -1319,7 +1319,7 @@ $data['QueryCrc'] = $query_crc; $data['TemplateNames'] = $this->GetVar('t'); $data['Hits'] = 1; - $data['LastHit'] = adodb_mktime(); + $data['LastHit'] = time(); $this->Conn->doInsert($data, TABLE_PREFIX . 'SlowSqlCapture'); } Index: core/units/stylesheets/stylesheets_item.php IDEA additional info: Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP <+>UTF-8 =================================================================== --- core/units/stylesheets/stylesheets_item.php (revision 15908) +++ core/units/stylesheets/stylesheets_item.php (revision ) @@ -37,7 +37,7 @@ $ret .= $this->GetDBField('AdvancedCSS'); - $compile_ts = adodb_mktime(); + $compile_ts = time(); $css_path = WRITEABLE . '/stylesheets/'; $file_helper = $this->Application->recallObject('FileHelper'); \ No newline at end of file Index: core/units/helpers/backup_helper.php IDEA additional info: Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP <+>UTF-8 =================================================================== --- core/units/helpers/backup_helper.php (revision 15908) +++ core/units/helpers/backup_helper.php (revision ) @@ -67,7 +67,7 @@ 'table_names' => $tables, 'table_count' => count($tables), 'record_count' => 0, - 'file_name' => $this->getBackupFile( adodb_mktime() ), + 'file_name' => $this->getBackupFile( time() ), ); $this->Application->RemoveVar('adm.backupcomplete_filename'); \ No newline at end of file Index: core/units/languages/languages_tag_processor.php IDEA additional info: Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP <+>UTF-8 =================================================================== --- core/units/languages/languages_tag_processor.php (revision 15908) +++ core/units/languages/languages_tag_processor.php (revision ) @@ -42,16 +42,16 @@ function CurrentDate($params) { $format = $params['format']; - $date = adodb_mktime(); + $date = time(); if (strpos($format, 'l') !== false) { - $week_day = $this->Application->Phrase('lu_weekday_'.adodb_date('l')); + $week_day = $this->Application->Phrase('lu_weekday_' . date('l')); $format = str_replace('l', '#@#', $format); // replace with reserved char (preserves translation link) - return str_replace('#@#', $week_day, adodb_date($format, $date)); + return str_replace('#@#', $week_day, date($format, $date)); } - return adodb_date($format, $date); + return date($format, $date); } function ListLanguages($params) \ No newline at end of file Index: core/kernel/db/db_tag_processor.php IDEA additional info: Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP <+>UTF-8 =================================================================== --- core/kernel/db/db_tag_processor.php (revision 15917) +++ core/kernel/db/db_tag_processor.php (revision ) @@ -1016,11 +1016,11 @@ continue; } - $replacements[$format_char] = $this->Application->Phrase($phrase_prefix . adodb_date($format_char, $date)); + $replacements[$format_char] = $this->Application->Phrase($phrase_prefix . date($format_char, $date)); $format = str_replace($format_char, '#' . ord($format_char) . '#', $format); } - $date_formatted = adodb_date($format, $date); + $date_formatted = date($format, $date); // unescape formats, that are resolved to words by adodb_date foreach ($replacements as $format_char => $format_replacement) { Index: core/units/logs/session_logs/session_log_eh.php IDEA additional info: Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP <+>UTF-8 =================================================================== --- core/units/logs/session_logs/session_log_eh.php (revision 15908) +++ core/units/logs/session_logs/session_log_eh.php (revision ) @@ -32,7 +32,7 @@ /* @var $object kDBItem */ $fields_hash = Array ( - 'SessionStart' => adodb_mktime(), + 'SessionStart' => time(), 'IP' => $this->Application->getClientIp(), 'PortalUserId' => $this->Application->RecallVar('user_id'), 'SessionId' => $this->Application->GetSID(), @@ -64,7 +64,7 @@ } $fields_hash = Array ( - 'SessionEnd' => adodb_mktime(), + 'SessionEnd' => time(), 'Status' => SESSION_LOG_LOGGED_OUT, ); \ No newline at end of file Index: core/kernel/session/session.php IDEA additional info: Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP <+>UTF-8 =================================================================== --- core/kernel/session/session.php (revision 15917) +++ core/kernel/session/session.php (revision ) @@ -352,7 +352,7 @@ else { //Otherwise we still suppose cookies are on, because may be it's the first time user visits the site //So we send cookies on to get it next time (when referal will tell us if they are realy off - $this->SetCookie('cookies_on', 1, adodb_mktime() + 31104000); //one year should be enough + $this->SetCookie('cookies_on', 1, time() + 31104000); //one year should be enough } } else { @@ -371,7 +371,7 @@ */ function SetCookie($name, $value, $expires = null) { - if (isset($expires) && $expires < adodb_mktime()) { + if (isset($expires) && $expires < time()) { unset($this->Application->HttpQuery->Cookie[$name]); } else { @@ -394,7 +394,7 @@ foreach ($old_style_domains as $old_style_domain) { if ($this->CookieDomain != $old_style_domain) { // new style cookie domain -> delete old style cookie to prevent infinite redirect - setcookie($name, $encrypted_value, adodb_mktime() - 3600, $this->CookiePath, $old_style_domain, $this->CookieSecure, true); + setcookie($name, $encrypted_value, time() - 3600, $this->CookiePath, $old_style_domain, $this->CookieSecure, true); } } @@ -426,7 +426,7 @@ $this->Expiration = $this->Storage->GetExpiration(); // If session has expired - if ($this->Expiration < adodb_mktime()) { + if ($this->Expiration < time()) { // when expired session is loaded, then SID is // not assigned, but used in Destroy method $this->SID = $sid; @@ -572,7 +572,7 @@ return true; } - $this->Expiration = adodb_mktime() + $this->SessionTimeout; + $this->Expiration = time() + $this->SessionTimeout; if ( !$force && /*!$this->Application->isAdmin &&*/ !$this->Application->GetVar('admin') && !$this->NeedSession() ) { // don't create session (in db) on Front-End, when sid is present (GPC), but data in db isn't Index: core/units/categories/categories_event_handler.php IDEA additional info: Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP <+>UTF-8 =================================================================== --- core/units/categories/categories_event_handler.php (revision 15908) +++ core/units/categories/categories_event_handler.php (revision ) @@ -1842,7 +1842,7 @@ $object->checkFilename(); $object->generateFilename(); - $now = adodb_mktime(); + $now = time(); if ( !$this->Application->isDebugMode() && strpos($event->Special, 'rebuild') === false ) { $object->SetDBField('Type', $object->GetOriginalField('Type')); \ No newline at end of file Index: core/units/admin/admin_tag_processor.php IDEA additional info: Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP <+>UTF-8 =================================================================== --- core/units/admin/admin_tag_processor.php (revision 15917) +++ core/units/admin/admin_tag_processor.php (revision ) @@ -509,9 +509,9 @@ function TimeFrame($params) { - $w = adodb_date('w'); - $m = adodb_date('m'); - $y = adodb_date('Y'); + $w = date('w'); + $m = date('m'); + $y = date('Y'); //FirstDayOfWeek is 0 for Sunday and 1 for Monday $fdow = $this->Application->ConfigValue('FirstDayOfWeek'); @@ -519,11 +519,12 @@ if ( $fdow && $w == 0 ) { $w = 7; } - $today_start = adodb_mktime(0, 0, 0, adodb_date('m'), adodb_date('d'), $y); + + $today_start = mktime(0, 0, 0, date('m'), date('d'), $y); $first_day_of_this_week = $today_start - ($w - $fdow) * 86400; - $first_day_of_this_month = adodb_mktime(0, 0, 0, $m, 1, $y); + $first_day_of_this_month = mktime(0, 0, 0, $m, 1, $y); $this_quater = ceil($m / 3); - $this_quater_start = adodb_mktime(0, 0, 0, $this_quater * 3 - 2, 1, $y); + $this_quater_start = mktime(0, 0, 0, $this_quater * 3 - 2, 1, $y); switch ( $params['type'] ) { case 'last_week_start': @@ -535,15 +536,15 @@ break; case 'last_month_start': - $timestamp = $m == 1 ? adodb_mktime(0, 0, 0, 12, 1, $y - 1) : adodb_mktime(0, 0, 0, $m - 1, 1, $y); + $timestamp = $m == 1 ? mktime(0, 0, 0, 12, 1, $y - 1) : mktime(0, 0, 0, $m - 1, 1, $y); break; case 'last_month_end': - $timestamp = $first_day_of_this_month = adodb_mktime(0, 0, 0, $m, 1, $y) - 1; + $timestamp = $first_day_of_this_month = mktime(0, 0, 0, $m, 1, $y) - 1; break; case 'last_quater_start': - $timestamp = $this_quater == 1 ? adodb_mktime(0, 0, 0, 10, 1, $y - 1) : adodb_mktime(0, 0, 0, ($this_quater - 1) * 3 - 2, 1, $y); + $timestamp = $this_quater == 1 ? mktime(0, 0, 0, 10, 1, $y - 1) : mktime(0, 0, 0, ($this_quater - 1) * 3 - 2, 1, $y); break; case 'last_quater_end': @@ -551,15 +552,15 @@ break; case 'last_6_months_start': - $timestamp = $m <= 6 ? adodb_mktime(0, 0, 0, $m + 6, 1, $y - 1) : adodb_mktime(0, 0, 0, $m - 6, 1, $y); + $timestamp = $m <= 6 ? mktime(0, 0, 0, $m + 6, 1, $y - 1) : mktime(0, 0, 0, $m - 6, 1, $y); break; case 'last_year_start': - $timestamp = adodb_mktime(0, 0, 0, 1, 1, $y - 1); + $timestamp = mktime(0, 0, 0, 1, 1, $y - 1); break; case 'last_year_end': - $timestamp = adodb_mktime(23, 59, 59, 12, 31, $y - 1); + $timestamp = mktime(23, 59, 59, 12, 31, $y - 1); break; default: @@ -577,7 +578,7 @@ $format = $lang->GetDBField($regs[1]); } - return adodb_date($format, $timestamp); + return date($format, $timestamp); } return $timestamp; Index: core/units/admin/admin_events_handler.php IDEA additional info: Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP <+>UTF-8 =================================================================== --- core/units/admin/admin_events_handler.php (revision 15917) +++ core/units/admin/admin_events_handler.php (revision ) @@ -1101,7 +1101,7 @@ */ protected function OnOptimizePerformance(kEvent $event) { - $start_time = adodb_mktime(); + $start_time = time(); $sql = 'SELECT SessionKey FROM ' . TABLE_PREFIX . 'UserSessions \ No newline at end of file Index: core/units/page_revisions/page_revision_eh.php IDEA additional info: Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP <+>UTF-8 =================================================================== --- core/units/page_revisions/page_revision_eh.php (revision 15908) +++ core/units/page_revisions/page_revision_eh.php (revision ) @@ -162,8 +162,8 @@ /* @var $object kDBItem */ if ( $object->GetDBField('IsDraft') == 0 && $object->GetOriginalField('IsDraft') == 1 ) { - $object->SetDBField('CreatedOn_date', adodb_mktime()); - $object->SetDBField('CreatedOn_time', adodb_mktime()); + $object->SetDBField('CreatedOn_date', time()); + $object->SetDBField('CreatedOn_time', time()); } } Index: core/kernel/utility/formatters/date_formatter.php IDEA additional info: Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP <+>UTF-8 =================================================================== --- core/kernel/utility/formatters/date_formatter.php (revision 15908) +++ core/kernel/utility/formatters/date_formatter.php (revision ) @@ -209,7 +209,7 @@ // when time is not supplied, then use "midnight" (or unit config override) $empty_time = getArrayValue($options, 'empty_time'); if ( $empty_time === false ) { - $empty_time = adodb_mktime(0, 0, 0); + $empty_time = mktime(0, 0, 0); } $object->SetDBField($sub_fields['time'], $empty_time); } @@ -217,7 +217,7 @@ // when date is not supplied, then use "1970-01-01 00:00:00" instead (or unit config override) $empty_date = getArrayValue($options, 'empty_date'); if ( $empty_date === false ) { - $empty_date = adodb_mktime(0, 0, 0, 1, 1, 1970); + $empty_date = mktime(0, 0, 0, 1, 1, 1970); } $object->SetDBField($sub_fields['date'], $empty_date); } @@ -265,7 +265,7 @@ } if (!$options['use_timezone']) { - return adodb_gmdate($options['format'], $value); + return gmdate($options['format'], $value); } $format = defined($options['format']) ? constant($options['format']) : $options['format']; @@ -275,7 +275,7 @@ $format = trim($format, $dt_separator); } - return adodb_date($format, $value); + return date($format, $value); } function HumanFormat($format) @@ -373,7 +373,7 @@ $format = $options['input_format']; if ($dt_separator) $format = trim($format, $dt_separator); - $error_params = Array( $this->HumanFormat($format), adodb_date($format), 'value' => $value ); + $error_params = Array( $this->HumanFormat($format), date($format), 'value' => $value ); $hour = 0; $minute = 0; @@ -496,14 +496,14 @@ } if (!$options['use_timezone']) { - return adodb_gmmktime($hour, $minute, $second, $month, $day, $year); + return gmmktime($hour, $minute, $second, $month, $day, $year); } - return adodb_mktime($hour, $minute, $second, $month, $day, $year); + return mktime($hour, $minute, $second, $month, $day, $year); } function GetSample($field, &$options, &$object) { - return $this->Format( adodb_mktime(), $field, $object, $options['input_format']); + return $this->Format( time(), $field, $object, $options['input_format']); } } \ No newline at end of file Index: core/install/install_toolkit.php IDEA additional info: Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP <+>UTF-8 =================================================================== --- core/install/install_toolkit.php (revision 15908) +++ core/install/install_toolkit.php (revision ) @@ -264,7 +264,6 @@ $module_name = 'in-portal'; } - // don't use "adodb_mktime" here, because it's not yet included $sql = 'UPDATE ' . $table_prefix . 'Modules SET Version = "' . $version . '", BuildDate = ' . time() . ' WHERE LOWER(Name) = "' . strtolower($module_name) . '"'; \ No newline at end of file