diff --git a/src/bb-library/Box/Log.php b/src/bb-library/Box/Log.php index 4a2d90704..718ea5a2c 100644 --- a/src/bb-library/Box/Log.php +++ b/src/bb-library/Box/Log.php @@ -124,7 +124,7 @@ class Box_Log protected function _packEvent($message, $priority) { return array_merge(array( - 'timestamp' => date('c'), + 'timestamp' => date('Y-m-d H:i:s'), 'message' => $message, 'priority' => $priority, 'priorityName' => $this->_priorities[$priority] diff --git a/src/bb-library/Model/ActivityClientHistoryTable.php b/src/bb-library/Model/ActivityClientHistoryTable.php index 286e30c35..0af01a072 100644 --- a/src/bb-library/Model/ActivityClientHistoryTable.php +++ b/src/bb-library/Model/ActivityClientHistoryTable.php @@ -46,8 +46,8 @@ class Model_ActivityClientHistoryTable implements \Box\InjectionAwareInterface $entry = $this->di['db']->dispense('ActivityClientHistory'); $entry->client_id = $data['client_id']; $entry->ip = $data['ip']; - $entry->created_at = date('c'); - $entry->updated_at = date('c'); + $entry->created_at = date('Y-m-d H:i:s'); + $entry->updated_at = date('Y-m-d H:i:s'); $this->di['db']->store($entry); } diff --git a/src/bb-library/Model/ApiRequestTable.php b/src/bb-library/Model/ApiRequestTable.php index 72f5d2a32..086791cfb 100644 --- a/src/bb-library/Model/ApiRequestTable.php +++ b/src/bb-library/Model/ApiRequestTable.php @@ -39,13 +39,13 @@ class Model_ApiRequestTable implements \Box\InjectionAwareInterface $r = $this->di['db']->dispense('ApiRequest'); $r->ip = $ip; $r->request = $request; - $r->created_at = date('c'); + $r->created_at = date('Y-m-d H:i:s'); $this->di['db']->store($r); } public function getRequestCount($since, $ip = null) { - $sinceIso = date('c', $since); + $sinceIso = date('Y-m-d H:i:s', $since); $sql = 'SELECT count(id) as cc WHERE created_at > :since'; diff --git a/src/bb-library/Model/ClientPasswordResetTable.php b/src/bb-library/Model/ClientPasswordResetTable.php index 4b21e48f6..e76adabe0 100644 --- a/src/bb-library/Model/ClientPasswordResetTable.php +++ b/src/bb-library/Model/ClientPasswordResetTable.php @@ -39,13 +39,13 @@ class Model_ClientPasswordResetTable implements \Box\InjectionAwareInterface $r = $this->di['db']->findOne('ClientPasswordReset', 'client_id', $client->id); if(!$r instanceof Model_ClientPasswordReset) { $r = $this->di['db']->dispense('ClientPasswordReset'); - $r->created_at = date('c'); + $r->created_at = date('Y-m-d H:i:s'); $r->client_id = $client->id; } $r->ip = $ip; $r->hash = sha1(rand(50, rand(10, 99))); - $r->updated_at = date('c'); + $r->updated_at = date('Y-m-d H:i:s'); $this->di['db']->store($r); return $r; diff --git a/src/bb-library/Payment/Adapter/BluePay.php b/src/bb-library/Payment/Adapter/BluePay.php index fa6dd8fc3..9d6fe3c8c 100644 --- a/src/bb-library/Payment/Adapter/BluePay.php +++ b/src/bb-library/Payment/Adapter/BluePay.php @@ -292,7 +292,7 @@ To find your ACCOUNT ID and SECRET KEY: 'error' => '', 'error_code'=> '', 'status' => 'processed', - 'updated_at'=> date('c'), + 'updated_at'=> date('Y-m-d H:i:s'), ); $api_admin->invoice_transaction_update($d); } diff --git a/src/bb-library/Payment/Adapter/Interkassa.php b/src/bb-library/Payment/Adapter/Interkassa.php index 1a44a2388..5682439c4 100644 --- a/src/bb-library/Payment/Adapter/Interkassa.php +++ b/src/bb-library/Payment/Adapter/Interkassa.php @@ -232,7 +232,7 @@ class Payment_Adapter_Interkassa extends Payment_AdapterAbstract implements \Box $tx->error = ''; $tx->error_code = ''; $tx->status = 'processed'; - $tx->updated_at = date('c'); + $tx->updated_at = date('Y-m-d H:i:s'); $this->di['db']->store($tx); return true; } diff --git a/src/bb-library/Payment/Adapter/PayPalEmail.php b/src/bb-library/Payment/Adapter/PayPalEmail.php index 7ba1b7946..134d61409 100644 --- a/src/bb-library/Payment/Adapter/PayPalEmail.php +++ b/src/bb-library/Payment/Adapter/PayPalEmail.php @@ -251,7 +251,7 @@ class Payment_Adapter_PayPalEmail implements \Box\InjectionAwareInterface 'error' => '', 'error_code'=> '', 'status' => 'processed', - 'updated_at'=> date('c'), + 'updated_at'=> date('Y-m-d H:i:s'), ); $api_admin->invoice_transaction_update($d); } diff --git a/src/bb-modules/Activity/Api/Admin.php b/src/bb-modules/Activity/Api/Admin.php index 17a92e24b..1033e05d1 100644 --- a/src/bb-modules/Activity/Api/Admin.php +++ b/src/bb-modules/Activity/Api/Admin.php @@ -67,8 +67,8 @@ class Admin extends \Api_Abstract $entry->admin_id = isset($data['admin_id']) ? $data['admin_id'] : NULL; $entry->priority = $priority; $entry->message = $data['m']; - $entry->created_at = date('c'); - $entry->updated_at = date('c'); + $entry->created_at = date('Y-m-d H:i:s'); + $entry->updated_at = date('Y-m-d H:i:s'); $entry->ip = $this->di['request']->getClientAddress(); $this->di['db']->store($entry); diff --git a/src/bb-modules/Activity/Service.php b/src/bb-modules/Activity/Service.php index bf063e5cd..922aba4d4 100644 --- a/src/bb-modules/Activity/Service.php +++ b/src/bb-modules/Activity/Service.php @@ -34,8 +34,8 @@ class Service implements InjectionAwareInterface $entry->admin_id = isset($data['admin_id']) ? $data['admin_id'] : NULL; $entry->priority = isset($data['priority']) ? $data['priority'] : NULL; $entry->message = $data['message']; - $entry->created_at = date('c'); - $entry->updated_at = date('c'); + $entry->created_at = date('Y-m-d H:i:s'); + $entry->updated_at = date('Y-m-d H:i:s'); $entry->ip = $this->di['request']->getClientAddress(); $this->di['db']->store($entry); } @@ -60,8 +60,8 @@ class Service implements InjectionAwareInterface $log = $di['db']->dispense('ActivityClientHistory'); $log->client_id = $params['id']; $log->ip = $params['ip']; - $log->created_at = date('c'); - $log->updated_at = date('c'); + $log->created_at = date('Y-m-d H:i:s'); + $log->updated_at = date('Y-m-d H:i:s'); $di['db']->store($log); } @@ -74,8 +74,8 @@ class Service implements InjectionAwareInterface $log= $di['db']->dispense('ActivityAdminHistory'); $log->admin_id = $params['id']; $log->ip = $params['ip']; - $log->created_at = date('c'); - $log->updated_at = date('c'); + $log->created_at = date('Y-m-d H:i:s'); + $log->updated_at = date('Y-m-d H:i:s'); $di['db']->store($log); } @@ -150,8 +150,8 @@ class Service implements InjectionAwareInterface $entry->subject = $subject; $entry->content_html = $content_html; $entry->content_text = $content_text; - $entry->created_at = date('c'); - $entry->updated_at = date('c'); + $entry->created_at = date('Y-m-d H:i:s'); + $entry->updated_at = date('Y-m-d H:i:s'); $this->di['db']->store($entry); diff --git a/src/bb-modules/Api/Service.php b/src/bb-modules/Api/Service.php index a1c366f8e..1ee8803b4 100644 --- a/src/bb-modules/Api/Service.php +++ b/src/bb-modules/Api/Service.php @@ -59,7 +59,7 @@ class Service implements \Box\InjectionAwareInterface if (!is_numeric($since)){ $since = strtotime($since); } - $sinceIso = date('c', $since); + $sinceIso = date('Y-m-d H:i:s', $since); $values = array( 'since' => $sinceIso, ); diff --git a/src/bb-modules/Cart/Service.php b/src/bb-modules/Cart/Service.php index 84ef27301..d6da488ba 100644 --- a/src/bb-modules/Cart/Service.php +++ b/src/bb-modules/Cart/Service.php @@ -63,8 +63,8 @@ class Service implements InjectionAwareInterface $cart = $this->di['db']->dispense('Cart'); $cart->session_id = $this->di['session']->getId(); $cart->currency_id = $currency->id; - $cart->created_at = date('c'); - $cart->updated_at = date('c'); + $cart->created_at = date('Y-m-d H:i:s'); + $cart->updated_at = date('Y-m-d H:i:s'); $this->di['db']->store($cart); return $cart; @@ -240,7 +240,7 @@ class Service implements InjectionAwareInterface $this->di['db']->trash($cartProduct); } $cart->promo_id = NULL; - $cart->updated_at = date('c'); + $cart->updated_at = date('Y-m-d H:i:s'); $this->di['db']->store($cart); return true; @@ -249,7 +249,7 @@ class Service implements InjectionAwareInterface public function removePromo(\Model_Cart $cart) { $cart->promo_id = NULL; - $cart->updated_at = date('c'); + $cart->updated_at = date('Y-m-d H:i:s'); $this->di['db']->store($cart); $this->di['logger']->info('Removed promo code from shopping cart #%s', $cart->id); @@ -510,8 +510,8 @@ class Service implements InjectionAwareInterface $order->status = \Model_ClientOrder::STATUS_PENDING_SETUP; $order->notes = isset($item['notes']) ? $item['notes'] : NULL; $order->config = json_encode($item); - $order->created_at = date('c'); - $order->updated_at = date('c'); + $order->created_at = date('Y-m-d H:i:s'); + $order->updated_at = date('Y-m-d H:i:s'); $this->di['db']->store($order); $orders[] = $order; @@ -618,7 +618,7 @@ class Service implements InjectionAwareInterface public function usePromo(\Model_Promo $promo) { $promo->used++; - $promo->updated_at = date('c'); + $promo->updated_at = date('Y-m-d H:i:s'); $this->di['db']->store($promo); } diff --git a/src/bb-modules/Client/Api/Admin.php b/src/bb-modules/Client/Api/Admin.php index 51a5f5d09..e5b4b64e1 100644 --- a/src/bb-modules/Client/Api/Admin.php +++ b/src/bb-modules/Client/Api/Admin.php @@ -369,7 +369,7 @@ class Admin extends \Api_Abstract $client->tax_exempt = $tax_exempt; } if(!is_null($created_at)) { - $client->created_at = date('c', strtotime($created_at)); + $client->created_at = date('Y-m-d H:i:s', strtotime($created_at)); } if(!is_null($c1)) { @@ -403,7 +403,7 @@ class Admin extends \Api_Abstract $client->custom_10 = $c10; } - $client->updated_at = date('c'); + $client->updated_at = date('Y-m-d H:i:s'); $this->di['db']->store($client); $this->di['events_manager']->fire(array('event'=>'onAfterAdminClientUpdate', 'params'=>array('id'=>$client->id))); @@ -445,7 +445,7 @@ class Admin extends \Api_Abstract $this->di['events_manager']->fire(array('event'=>'onBeforeAdminClientPasswordChange', 'params'=>$data)); $client->pass = $this->di['password']->hashIt($data['password']); - $client->updated_at = date('c'); + $client->updated_at = date('Y-m-d H:i:s'); $this->di['db']->store($client); $this->di['events_manager']->fire(array('event'=>'onAfterAdminClientPasswordChange', 'params'=>array('id'=>$client->id, 'password'=>$data['password']))); @@ -674,7 +674,7 @@ class Admin extends \Api_Abstract $model->title = $data['title']; } - $model->updated_at = date('c'); + $model->updated_at = date('Y-m-d H:i:s'); $this->di['db']->store($model); return true; } diff --git a/src/bb-modules/Client/Api/Client.php b/src/bb-modules/Client/Api/Client.php index f5efa0889..f43b400f3 100644 --- a/src/bb-modules/Client/Api/Client.php +++ b/src/bb-modules/Client/Api/Client.php @@ -202,7 +202,7 @@ class Client extends \Api_Abstract $client->custom_10 = $data['custom_10']; } - $client->updated_at = date('c'); + $client->updated_at = date('Y-m-d H:i:s'); $this->di['db']->store($client); $this->di['events_manager']->fire(array('event'=>'onAfterClientProfileUpdate', 'params'=>array('id'=>$client->id))); @@ -230,7 +230,7 @@ class Client extends \Api_Abstract $client = $this->getIdentity(); $client->api_token = $this->di['tools']->generatePassword(32); - $client->updated_at = date('c'); + $client->updated_at = date('Y-m-d H:i:s'); $this->di['db']->store($client); $this->di['logger']->info('Generated new API key'); diff --git a/src/bb-modules/Client/Api/Guest.php b/src/bb-modules/Client/Api/Guest.php index df9ead840..1234833c1 100644 --- a/src/bb-modules/Client/Api/Guest.php +++ b/src/bb-modules/Client/Api/Guest.php @@ -211,8 +211,8 @@ class Guest extends \Api_Abstract $reset->client_id = $c->id; $reset->ip = $this->ip; $reset->hash = $hash; - $reset->created_at = date('c'); - $reset->updated_at = date('c'); + $reset->created_at = date('Y-m-d H:i:s'); + $reset->updated_at = date('Y-m-d H:i:s'); $this->di['db']->store($reset); //send email diff --git a/src/bb-modules/Client/Service.php b/src/bb-modules/Client/Service.php index bed70300f..d9baea96e 100644 --- a/src/bb-modules/Client/Service.php +++ b/src/bb-modules/Client/Service.php @@ -57,8 +57,8 @@ class Service implements InjectionAwareInterface $meta->client_id = $client_id; $meta->meta_key = 'confirm_email'; $meta->meta_value = $hash; - $meta->created_at = date('c'); - $meta->updated_at = date('c'); + $meta->created_at = date('Y-m-d H:i:s'); + $meta->updated_at = date('Y-m-d H:i:s'); $db->store($meta); return $this->di['tools']->url('/client/confirm-email/'.$hash); @@ -260,8 +260,8 @@ class Service implements InjectionAwareInterface $credit->rel_id = isset($data['rel_id']) ? $data['rel_id'] : null; $credit->description = $description; $credit->amount = $amount; - $credit->created_at = date('c'); - $credit->updated_at = date('c'); + $credit->created_at = date('Y-m-d H:i:s'); + $credit->updated_at = date('Y-m-d H:i:s'); $this->di['db']->store($credit); return true; @@ -453,8 +453,8 @@ class Service implements InjectionAwareInterface $model = $this->di['db']->dispense('ClientGroup'); $model->title = $data['title']; - $model->updated_at = date('c'); - $model->created_at = date('c'); + $model->updated_at = date('Y-m-d H:i:s'); + $model->created_at = date('Y-m-d H:i:s'); $group_id = $this->di['db']->store($model); @@ -520,8 +520,8 @@ class Service implements InjectionAwareInterface $client->custom_10 = isset($data['custom_10']) ? $data['custom_10'] : NULL ; $client->ip = isset($data['ip']) ? $data['ip'] : NULL; - $client->created_at = isset($data['created_at']) ? date('c', strtotime($data['created_at'])) : date('c'); - $client->updated_at = date('c'); + $client->created_at = isset($data['created_at']) ? date('Y-m-d H:i:s', strtotime($data['created_at'])) : date('Y-m-d H:i:s'); + $client->updated_at = date('Y-m-d H:i:s'); $this->di['db']->store($client); return $client; } diff --git a/src/bb-modules/Cron/Service.php b/src/bb-modules/Cron/Service.php index 2534d963b..9119c27c7 100644 --- a/src/bb-modules/Cron/Service.php +++ b/src/bb-modules/Cron/Service.php @@ -69,7 +69,7 @@ class Service $create = (APPLICATION_ENV == 'production'); $ss = $this->di['mod_service']('system'); - $ss->setParamValue('last_cron_exec', date('c'), $create); + $ss->setParamValue('last_cron_exec', date('Y-m-d H:i:s'), $create); $this->di['events_manager']->fire(array('event'=>'onAfterAdminCronRun')); diff --git a/src/bb-modules/Currency/Service.php b/src/bb-modules/Currency/Service.php index e22d4f0b5..7fd48deb2 100644 --- a/src/bb-modules/Currency/Service.php +++ b/src/bb-modules/Currency/Service.php @@ -355,8 +355,8 @@ class Service implements InjectionAwareInterface $model->title = $title; $model->format = $format; $model->conversion_rate = $conversionRate; - $model->created_at = date('c'); - $model->updated_at = date('c'); + $model->created_at = date('Y-m-d H:i:s'); + $model->updated_at = date('Y-m-d H:i:s'); $this->di['db']->store($model); $this->di['logger']->info('Added new currency %s', $model->code); @@ -400,7 +400,7 @@ class Service implements InjectionAwareInterface $model->conversion_rate = $conversionRate; } - $model->updated_at = date('c'); + $model->updated_at = date('Y-m-d H:i:s'); $db->store($model); $this->di['logger']->info('Updated currency %s', $model->code); diff --git a/src/bb-modules/Email/Service.php b/src/bb-modules/Email/Service.php index 36fc77eca..b82cd185a 100644 --- a/src/bb-modules/Email/Service.php +++ b/src/bb-modules/Email/Service.php @@ -261,8 +261,8 @@ class Service implements \Box\InjectionAwareInterface $queue->client_id = $client_id; $queue->admin_id = $admin_id; $queue->status = 'unsent'; - $queue->created_at = date('c'); - $queue->updated_at = date('c'); + $queue->created_at = date('Y-m-d H:i:s'); + $queue->updated_at = date('Y-m-d H:i:s'); $queue->priority = 1; $queue->tries = 0; try { @@ -605,7 +605,7 @@ class Service implements \Box\InjectionAwareInterface if ($queue->priority) $queue->priority--; $queue->status = 'unsent'; $queue->tries++; - $queue->updated_at = date('c'); + $queue->updated_at = date('Y-m-d H:i:s'); $this->di['db']->store($queue); if ($settings['cancel_after'] && $queue->tries > $settings['cancel_after']) $this->di['db']->trash($queue); } diff --git a/src/bb-modules/Example/Service.php b/src/bb-modules/Example/Service.php index eb37236e4..ee6cc463e 100644 --- a/src/bb-modules/Example/Service.php +++ b/src/bb-modules/Example/Service.php @@ -168,10 +168,10 @@ class Service $meta->rel_type = 'ip'; $meta->rel_id = $params['ip']; $meta->meta_key = 'counter'; - $meta->created_at = date('c'); + $meta->created_at = date('Y-m-d H:i:s'); } $meta->meta_value = $meta->meta_value + 1; - $meta->updated_at = date('c'); + $meta->updated_at = date('Y-m-d H:i:s'); $di['db']->store($meta); // Now we can perform task depending on how many times wrong details were entered @@ -202,8 +202,8 @@ class Service $meta->extension = 'mod_example'; $meta->meta_key = 'event_params'; $meta->meta_value = json_encode($params); - $meta->created_at = date('c'); - $meta->updated_at = date('c'); + $meta->created_at = date('Y-m-d H:i:s'); + $meta->updated_at = date('Y-m-d H:i:s'); $di['db']->store($meta); } diff --git a/src/bb-modules/Extension/Service.php b/src/bb-modules/Extension/Service.php index 7b6259c03..529530337 100644 --- a/src/bb-modules/Extension/Service.php +++ b/src/bb-modules/Extension/Service.php @@ -567,8 +567,8 @@ class Service implements InjectionAwareInterface $c->extension = $ext; $c->meta_key = 'config'; $c->meta_value = null; - $c->created_at = date('c'); - $c->updated_at = date('c'); + $c->created_at = date('Y-m-d H:i:s'); + $c->updated_at = date('Y-m-d H:i:s'); $this->di['db']->store($c); $config = array(); } else { diff --git a/src/bb-modules/Formbuilder/Service.php b/src/bb-modules/Formbuilder/Service.php index 295602832..5a548f0ae 100644 --- a/src/bb-modules/Formbuilder/Service.php +++ b/src/bb-modules/Formbuilder/Service.php @@ -70,8 +70,8 @@ class Service implements InjectionAwareInterface $bean = $this->di['db']->dispense('Form'); $bean->name = $data['name']; $bean->style = $data['style']; - $bean->created_at = date('c'); - $bean->updated_at = date('c'); + $bean->created_at = date('Y-m-d H:i:s'); + $bean->updated_at = date('Y-m-d H:i:s'); $form_id = $this->di['db']->store($bean); $this->di['logger']->info('Created new form %s with id %s', $data['name'], $form_id); @@ -120,8 +120,8 @@ class Service implements InjectionAwareInterface $bean->show_prefix = isset($field['show_prefix']) ? $field['show_prefix'] : null; $bean->show_suffix = isset ($field['show_suffix']) ? $field['show_suffix'] : null; $bean->text_size = isset($field['text_size']) ? $field['text_size'] : null; - $bean->created_at = date('c'); - $bean->updated_at = date('c'); + $bean->created_at = date('Y-m-d H:i:s'); + $bean->updated_at = date('Y-m-d H:i:s'); $fieldId = $this->di['db']->store($bean); $this->di['logger']->info('Added new field %s to form %s', $fieldId, $field['form_id']); @@ -218,7 +218,7 @@ class Service implements InjectionAwareInterface $bean->show_prefix = isset($field['show_prefix']) ? $field['show_prefix'] : null; $bean->show_suffix = isset($field['show_suffix']) ? $field['show_suffix'] : null; $bean->text_size = isset($field['text_size']) ? $field['text_size'] : null; - $bean->updated_at = date('c'); + $bean->updated_at = date('Y-m-d H:i:s'); $this->di['db']->store($bean); $this->di['logger']->info('Updated custom form %s', $fieldId); diff --git a/src/bb-modules/Forum/Api/Admin.php b/src/bb-modules/Forum/Api/Admin.php index 42e005fe5..cf3cb6aee 100644 --- a/src/bb-modules/Forum/Api/Admin.php +++ b/src/bb-modules/Forum/Api/Admin.php @@ -114,8 +114,8 @@ class Admin extends \Api_Abstract $model->status = isset($data['status']) ? $data['status'] : \Model_Forum::STATUS_ACTIVE; $model->description = isset($data['description']) ? $data['description'] : NULL; $model->priority = $priority + 1; - $model->created_at = date('c'); - $model->updated_at = date('c'); + $model->created_at = date('Y-m-d H:i:s'); + $model->updated_at = date('Y-m-d H:i:s'); $this->di['db']->store($model); $this->di['logger']->info('Created new forum "%s"', $model->title); @@ -174,7 +174,7 @@ class Admin extends \Api_Abstract $model->priority = $data['priority']; } - $model->updated_at = date('c'); + $model->updated_at = date('Y-m-d H:i:s'); $this->di['db']->store($model); $this->di['logger']->info('Updated forum "%s"', $model->title); @@ -199,7 +199,7 @@ class Admin extends \Api_Abstract $model = $this->di['db']->getExistingModelById('Forum', $id); if($model instanceof \Model_Forum) { $model->priority = $p; - $model->updated_at = date('c'); + $model->updated_at = date('Y-m-d H:i:s'); $this->di['db']->store($model); } } @@ -330,8 +330,8 @@ class Admin extends \Api_Abstract $topic->title = $data['title']; $topic->slug = $this->di['tools']->slug($data['title']); $topic->status = isset($data['status']) ? $data['status'] : \Model_ForumTopic::STATUS_ACTIVE; - $topic->created_at = date('c'); - $topic->updated_at = date('c'); + $topic->created_at = date('Y-m-d H:i:s'); + $topic->updated_at = date('Y-m-d H:i:s'); $this->di['db']->store($topic); $msg = $this->di['db']->dispense('ForumTopicMessage'); @@ -339,8 +339,8 @@ class Admin extends \Api_Abstract $msg->forum_topic_id = $topic->id; $msg->message = $data['message']; $msg->ip = $this->getIp(); - $msg->created_at = date('c'); - $msg->updated_at = date('c'); + $msg->created_at = date('Y-m-d H:i:s'); + $msg->updated_at = date('Y-m-d H:i:s'); $this->di['db']->store($msg); $this->di['logger']->info('Started new forum topic "%s"', $topic->title); @@ -395,7 +395,7 @@ class Admin extends \Api_Abstract $model->views = $data['views']; } - $model->updated_at = date('c'); + $model->updated_at = date('Y-m-d H:i:s'); $this->di['db']->store($model); $this->di['logger']->info('Updated forum topic "%s"', $model->title); @@ -471,7 +471,7 @@ class Admin extends \Api_Abstract $model->message = $data['message']; } - $model->updated_at = date('c'); + $model->updated_at = date('Y-m-d H:i:s'); $this->di['db']->store($model); $this->di['logger']->info('Updated forum topic message #%s', $model->id); @@ -534,11 +534,11 @@ class Admin extends \Api_Abstract $msg->forum_topic_id = $topic->id; $msg->message = $data['message']; $msg->ip = $this->getIp(); - $msg->created_at = date('c'); - $msg->updated_at = date('c'); + $msg->created_at = date('Y-m-d H:i:s'); + $msg->updated_at = date('Y-m-d H:i:s'); $this->di['db']->store($msg); - $topic->updated_at = date('c'); + $topic->updated_at = date('Y-m-d H:i:s'); $this->di['db']->store($topic); $this->di['events_manager']->fire(array('event'=>'onAfterAdminRepliedInForum', 'params'=>array('id'=>$topic->id, 'message_id'=>$msg->id, 'admin_id'=>$admin->id))); diff --git a/src/bb-modules/Forum/Api/Client.php b/src/bb-modules/Forum/Api/Client.php index 31564720d..5c3240314 100644 --- a/src/bb-modules/Forum/Api/Client.php +++ b/src/bb-modules/Forum/Api/Client.php @@ -185,8 +185,8 @@ class Client extends \Api_Abstract $topic->title = $data['topic']; $topic->slug = $this->di['tools']->slug($data['topic']); $topic->status = 'active'; - $topic->created_at = date('c'); - $topic->updated_at = date('c'); + $topic->created_at = date('Y-m-d H:i:s'); + $topic->updated_at = date('Y-m-d H:i:s'); $this->di['db']->store($topic); $msg = $this->di['db']->dispense('ForumTopicMessage'); @@ -194,8 +194,8 @@ class Client extends \Api_Abstract $msg->forum_topic_id = $topic->id; $msg->message = $data['message']; $msg->ip = $this->getIp(); - $msg->created_at = date('c'); - $msg->updated_at = date('c'); + $msg->created_at = date('Y-m-d H:i:s'); + $msg->updated_at = date('Y-m-d H:i:s'); $this->di['db']->store($msg); $this->di['events_manager']->fire(array('event' => 'onAfterClientCreateForumTopic', 'params' => array('id' => $topic->id))); @@ -270,11 +270,11 @@ class Client extends \Api_Abstract $msg->forum_topic_id = $topic->id; $msg->message = $data['message']; $msg->ip = $this->getIp(); - $msg->created_at = date('c'); - $msg->updated_at = date('c'); + $msg->created_at = date('Y-m-d H:i:s'); + $msg->updated_at = date('Y-m-d H:i:s'); $this->di['db']->store($msg); - $topic->updated_at = date('c'); + $topic->updated_at = date('Y-m-d H:i:s'); $this->di['db']->store($topic); $this->di['events_manager']->fire(array('event' => 'onAfterClientRepliedInForum', 'params' => array('id' => $topic->id, 'message_id' => $msg->id, 'client_id' => $client->id))); @@ -368,8 +368,8 @@ class Client extends \Api_Abstract $meta->rel_id = $data['id']; $meta->meta_key = 'notification'; $meta->meta_value = 1; - $meta->created_at = date('c'); - $meta->updated_at = date('c'); + $meta->created_at = date('Y-m-d H:i:s'); + $meta->updated_at = date('Y-m-d H:i:s'); $this->di['db']->store($meta); $this->di['logger']->info('Subscribed to forum topic %s', $data['id']); @@ -461,8 +461,8 @@ class Client extends \Api_Abstract $meta->rel_id = $data['id']; $meta->meta_key = 'favorite'; $meta->meta_value = 1; - $meta->created_at = date('c'); - $meta->updated_at = date('c'); + $meta->created_at = date('Y-m-d H:i:s'); + $meta->updated_at = date('Y-m-d H:i:s'); $this->di['db']->store($meta); $this->di['logger']->info('Added forum topic %s to favorites', $data['id']); diff --git a/src/bb-modules/Forum/Service.php b/src/bb-modules/Forum/Service.php index 5c77f6afc..5d253ed88 100644 --- a/src/bb-modules/Forum/Service.php +++ b/src/bb-modules/Forum/Service.php @@ -160,7 +160,7 @@ class Service implements InjectionAwareInterface $amount = $meta->meta_value + $amount; } $meta->meta_value = $amount; - $meta->updated_at = date('c'); + $meta->updated_at = date('Y-m-d H:i:s'); $this->di['db']->store($meta); } @@ -174,7 +174,7 @@ class Service implements InjectionAwareInterface $minus_points = -$post->points; $post->points = null; - $post->updated_at = date('c'); + $post->updated_at = date('Y-m-d H:i:s'); $this->di['db']->store($post); $this->updateTotalPoints($post->client_id, $minus_points, true); @@ -191,8 +191,8 @@ class Service implements InjectionAwareInterface $meta->client_id = $client_id; $meta->meta_key = 'points_total'; $meta->meta_value = 0; - $meta->created_at = date('c'); - $meta->updated_at = date('c'); + $meta->created_at = date('Y-m-d H:i:s'); + $meta->updated_at = date('Y-m-d H:i:s'); $this->di['db']->store($meta); } return $meta; diff --git a/src/bb-modules/Hook/Service.php b/src/bb-modules/Hook/Service.php index aba94265f..7c7e092bf 100644 --- a/src/bb-modules/Hook/Service.php +++ b/src/bb-modules/Hook/Service.php @@ -162,8 +162,8 @@ class Service implements InjectionAwareInterface $meta->rel_id = $mod; $meta->meta_key = 'listener'; $meta->meta_value = $event; - $meta->created_at = date('c'); - $meta->updated_at = date('c'); + $meta->created_at = date('Y-m-d H:i:s'); + $meta->updated_at = date('Y-m-d H:i:s'); $this->di['db']->store($meta); return true; diff --git a/src/bb-modules/Invoice/Service.php b/src/bb-modules/Invoice/Service.php index f2241ceaf..880486aa9 100644 --- a/src/bb-modules/Invoice/Service.php +++ b/src/bb-modules/Invoice/Service.php @@ -390,8 +390,8 @@ class Service implements InjectionAwareInterface $invoice->approved = TRUE; $invoice->currency_rate = $ctable->getRateByCode($invoice->currency); $invoice->status = \Model_Invoice::STATUS_PAID; - $invoice->paid_at = date('c'); - $invoice->updated_at = date('c'); + $invoice->paid_at = date('Y-m-d H:i:s'); + $invoice->updated_at = date('Y-m-d H:i:s'); $this->di['db']->store($invoice); $this->countIncome($invoice); @@ -469,8 +469,8 @@ class Service implements InjectionAwareInterface $model->text_2 = $data['text_2']; } - $model->created_at = date('c'); - $model->updated_at = date('c'); + $model->created_at = date('Y-m-d H:i:s'); + $model->updated_at = date('Y-m-d H:i:s'); $invoiceId = $this->di['db']->store($model);; $this->setInvoiceDefaults($model); @@ -531,7 +531,7 @@ class Service implements InjectionAwareInterface $invoice_due_days = 1; } $due_time = strtotime('+' . $invoice_due_days . ' day'); - $model->due_at = date('c', $due_time); + $model->due_at = date('Y-m-d H:i:s', $due_time); $model->serie = $systemService->getParamValue('invoice_series'); $model->nr = $model->id; @@ -551,7 +551,7 @@ class Service implements InjectionAwareInterface $this->di['events_manager']->fire(array('event'=>'onBeforeAdminInvoiceApprove', 'params'=>array('id'=>$invoice->id))); $invoice->approved = 1; - $invoice->updated_at = date('c'); + $invoice->updated_at = date('Y-m-d H:i:s'); $this->di['db']->store($invoice); $this->di['events_manager']->fire(array('event'=>'onAfterAdminInvoiceApprove', 'params'=>array('id'=>$invoice->id))); @@ -673,9 +673,9 @@ class Service implements InjectionAwareInterface $new->buyer_email = $invoice->buyer_email; $new->buyer_zip = $invoice->buyer_zip; - $new->paid_at = date('c'); - $new->created_at = date('c'); - $new->updated_at = date('c'); + $new->paid_at = date('Y-m-d H:i:s'); + $new->created_at = date('Y-m-d H:i:s'); + $new->updated_at = date('Y-m-d H:i:s'); $this->di['db']->store($new); $invoiceItems = $this->di['db']->find('InvoiceItem', 'invoice_id = ?', array($invoice->id)); @@ -693,8 +693,8 @@ class Service implements InjectionAwareInterface $pi->charged = 1; $pi->price = -$item->price; $pi->taxed = $item->taxed; - $pi->created_at = date('c'); - $pi->updated_at = date('c'); + $pi->created_at = date('Y-m-d H:i:s'); + $pi->updated_at = date('Y-m-d H:i:s'); $this->di['db']->store($pi); } @@ -729,7 +729,7 @@ class Service implements InjectionAwareInterface case 'same_invoice': $amount = $this->getTotalWithTax($invoice); $invoice->refund = empty($amount) ? NULL : $amount; - $invoice->updated_at = date('c'); + $invoice->updated_at = date('Y-m-d H:i:s'); $this->di['db']->store($invoice); if(!empty($note)) { @@ -854,7 +854,7 @@ class Service implements InjectionAwareInterface if(empty($data['paid_at'])) { $model->paid_at = null; } else { - $model->paid_at = date('c', strtotime($data['paid_at'])); + $model->paid_at = date('Y-m-d H:i:s', strtotime($data['paid_at'])); } } @@ -862,7 +862,7 @@ class Service implements InjectionAwareInterface if(empty($data['due_at'])) { $model->due_at = null; } else { - $model->due_at = date('c', strtotime($data['due_at'])); + $model->due_at = date('Y-m-d H:i:s', strtotime($data['due_at'])); } } @@ -894,7 +894,7 @@ class Service implements InjectionAwareInterface } if(isset($data['created_at'])) { - $model->created_at = date('c', strtotime($data['created_at'])); + $model->created_at = date('Y-m-d H:i:s', strtotime($data['created_at'])); } if(isset($data['new_item']) && is_array($data['new_item'])) { @@ -913,7 +913,7 @@ class Service implements InjectionAwareInterface } } - $model->updated_at = date('c'); + $model->updated_at = date('Y-m-d H:i:s'); $this->di['db']->store($model); $this->di['events_manager']->fire(array('event'=>'onAfterAdminInvoiceUpdate', 'params'=>array('id'=>$model->id))); @@ -1033,8 +1033,8 @@ class Service implements InjectionAwareInterface $proforma->status = \Model_Invoice::STATUS_UNPAID; $proforma->currency = $order->currency; $proforma->approved = false; - $proforma->created_at = date('c'); - $proforma->updated_at = date('c'); + $proforma->created_at = date('Y-m-d H:i:s'); + $proforma->updated_at = date('Y-m-d H:i:s'); $this->di['db']->store($proforma); $this->setInvoiceDefaults($proforma); @@ -1055,7 +1055,7 @@ class Service implements InjectionAwareInterface // invoice due date if($due_days > 0) { - $proforma->due_at = date('c', strtotime('+'.$due_days.' days')); + $proforma->due_at = date('Y-m-d H:i:s', strtotime('+'.$due_days.' days')); $this->di['db']->store($proforma); } else if($order->expires_at) { $proforma->due_at = $order->expires_at; @@ -1139,7 +1139,7 @@ class Service implements InjectionAwareInterface $this->di['events_manager']->fire(array('event'=>'onEventAfterInvoiceIsDue', 'params'=>$params)); } - $ss->setParamValue($key, date('c')); + $ss->setParamValue($key, date('Y-m-d H:i:s')); $this->di['logger']->info('Executed action to invoke invoice due event'); return true; } @@ -1153,8 +1153,8 @@ class Service implements InjectionAwareInterface $this->di['events_manager']->fire(array('event'=>'onBeforeAdminInvoiceSendReminder', 'params'=>array('id'=>$invoice->id))); - $invoice->reminded_at = date('c'); - $invoice->updated_at = date('c'); + $invoice->reminded_at = date('Y-m-d H:i:s'); + $invoice->updated_at = date('Y-m-d H:i:s'); $this->di['db']->store($invoice); $this->di['events_manager']->fire(array('event'=>'onAfterAdminInvoiceReminderSent', 'params'=>array('id'=>$invoice->id))); @@ -1206,8 +1206,8 @@ class Service implements InjectionAwareInterface $proforma->status = \Model_Invoice::STATUS_UNPAID; $proforma->currency = $client->currency; $proforma->approved = $this->_isAutoApproved(); - $proforma->created_at = date('c'); - $proforma->updated_at = date('c'); + $proforma->created_at = date('Y-m-d H:i:s'); + $proforma->updated_at = date('Y-m-d H:i:s'); $this->di['db']->store($proforma); $this->setInvoiceDefaults($proforma); @@ -1407,8 +1407,8 @@ class Service implements InjectionAwareInterface public function addNote(\Model_Invoice $model, $note) { $n = $model->notes; - $model->notes = $n . date('c') .': '.$note.' '.PHP_EOL; - $model->updated_at = date('c'); + $model->notes = $n . date('Y-m-d H:i:s') .': '.$note.' '.PHP_EOL; + $model->updated_at = date('Y-m-d H:i:s'); $this->di['db']->store($model); return true; } diff --git a/src/bb-modules/Invoice/ServiceInvoiceItem.php b/src/bb-modules/Invoice/ServiceInvoiceItem.php index f7de2df8b..dc05c8389 100644 --- a/src/bb-modules/Invoice/ServiceInvoiceItem.php +++ b/src/bb-modules/Invoice/ServiceInvoiceItem.php @@ -41,11 +41,11 @@ class ServiceInvoiceItem implements InjectionAwareInterface if($charge && !$item->charged) { $this->creditInvoiceItem($item); $item->charged = TRUE; - $item->updated_at = date('c'); + $item->updated_at = date('Y-m-d H:i:s'); } $item->status = \Model_InvoiceItem::STATUS_PENDING_SETUP; - $item->updated_at = date('c'); + $item->updated_at = date('Y-m-d H:i:s'); $this->di['db']->store($item); $oid = $this->getOrderId($item); @@ -152,8 +152,8 @@ class ServiceInvoiceItem implements InjectionAwareInterface $pi->charged = isset($data['charged']) ? (bool)$data['charged'] : 0; $pi->price = isset($data['price']) ? (float)$data['price'] : 0; $pi->taxed = isset($data['taxed']) ? (bool)$data['taxed'] : FALSE; - $pi->created_at = date('c'); - $pi->updated_at = date('c'); + $pi->created_at = date('Y-m-d H:i:s'); + $pi->updated_at = date('Y-m-d H:i:s'); $itemId = $this->di['db']->store($pi); return (int) $itemId; @@ -194,7 +194,7 @@ class ServiceInvoiceItem implements InjectionAwareInterface $item->taxed = false; } - $item->updated_at = date('c'); + $item->updated_at = date('Y-m-d H:i:s'); $this->di['db']->store($item); } @@ -222,8 +222,8 @@ class ServiceInvoiceItem implements InjectionAwareInterface $pi->charged = 1; $pi->price = $amount; $pi->taxed = FALSE; - $pi->created_at = date('c'); - $pi->updated_at = date('c'); + $pi->created_at = date('Y-m-d H:i:s'); + $pi->updated_at = date('Y-m-d H:i:s'); $this->di['db']->store($pi); } @@ -243,8 +243,8 @@ class ServiceInvoiceItem implements InjectionAwareInterface $credit->rel_id = $invoice->id; $credit->description = $item->title; $credit->amount = -$total; - $credit->created_at = date('c'); - $credit->updated_at = date('c'); + $credit->created_at = date('Y-m-d H:i:s'); + $credit->updated_at = date('Y-m-d H:i:s'); $this->di['db']->store($credit); $invoiceService = $this->di['mod_service']('Invoice'); @@ -267,7 +267,7 @@ class ServiceInvoiceItem implements InjectionAwareInterface protected function markAsExecuted(\Model_InvoiceItem $item) { $item->status = \Model_InvoiceItem::STATUS_EXECUTED; - $item->updated_at = date('c'); + $item->updated_at = date('Y-m-d H:i:s'); $this->di['db']->store($item); } @@ -291,8 +291,8 @@ class ServiceInvoiceItem implements InjectionAwareInterface $pi->unit = $order->unit; $pi->price = $price; $pi->taxed = $taxed; - $pi->created_at = date('c'); - $pi->updated_at = date('c'); + $pi->created_at = date('Y-m-d H:i:s'); + $pi->updated_at = date('Y-m-d H:i:s'); $this->di['db']->store($pi); $corderService->setUnpaidInvoice($order, $proforma); diff --git a/src/bb-modules/Invoice/ServiceSubscription.php b/src/bb-modules/Invoice/ServiceSubscription.php index 642cee721..73ac49fb8 100644 --- a/src/bb-modules/Invoice/ServiceSubscription.php +++ b/src/bb-modules/Invoice/ServiceSubscription.php @@ -48,8 +48,8 @@ class ServiceSubscription implements InjectionAwareInterface $model->currency = isset($data['currency']) ? $data['currency'] : NULL; $model->rel_id = isset($data['rel_id']) ? $data['rel_id'] : NULL; $model->rel_type = isset($data['rel_type']) ? $data['rel_type'] : NULL; - $model->created_at = date('c'); - $model->updated_at = date('c'); + $model->created_at = date('Y-m-d H:i:s'); + $model->updated_at = date('Y-m-d H:i:s'); $newId = $this->di['db']->store($model); $this->di['events_manager']->fire(array('event'=>'onAfterAdminSubscriptionCreate', 'params'=>array('id'=>$newId))); @@ -80,7 +80,7 @@ class ServiceSubscription implements InjectionAwareInterface $model->currency = $data['currency']; } - $model->updated_at = date('c'); + $model->updated_at = date('Y-m-d H:i:s'); $newId = $this->di['db']->store($model); $this->di['logger']->info('Updated subscription %s', $newId); @@ -252,7 +252,7 @@ class ServiceSubscription implements InjectionAwareInterface public function unsubscribe(\Model_Subscription $model) { $model->status = 'canceled'; - $model->updated_at = date('c'); + $model->updated_at = date('Y-m-d H:i:s'); $this->di['db']->store($model); } } \ No newline at end of file diff --git a/src/bb-modules/Invoice/ServiceTax.php b/src/bb-modules/Invoice/ServiceTax.php index ba166e3e2..4af68ed22 100644 --- a/src/bb-modules/Invoice/ServiceTax.php +++ b/src/bb-modules/Invoice/ServiceTax.php @@ -100,8 +100,8 @@ class ServiceTax implements InjectionAwareInterface $model->country = (!isset($data['country']) || empty($data['country'])) ? NULL : $data['country']; $model->state = (!isset($data['state']) || empty($data['state'])) ? NULL : $data['state']; $model->taxrate = $data['taxrate']; - $model->created_at = date('c'); - $model->updated_at = date('c'); + $model->created_at = date('Y-m-d H:i:s'); + $model->updated_at = date('Y-m-d H:i:s'); $newId = $this->di['db']->store($model); $this->di['logger']->info('Created new tax rule %s', $model->name); diff --git a/src/bb-modules/Invoice/ServiceTransaction.php b/src/bb-modules/Invoice/ServiceTransaction.php index b3f7c402d..e96efff1f 100644 --- a/src/bb-modules/Invoice/ServiceTransaction.php +++ b/src/bb-modules/Invoice/ServiceTransaction.php @@ -89,7 +89,7 @@ class ServiceTransaction implements InjectionAwareInterface $model->validate_ipn = $data['validate_ipn']; } - $model->updated_at = date('c'); + $model->updated_at = date('Y-m-d H:i:s'); $this->di['db']->store($model); $this->di['events_manager']->fire(array('event'=>'onAfterAdminTransactionUpdate', 'params'=>array('id'=>$model->id))); @@ -142,8 +142,8 @@ class ServiceTransaction implements InjectionAwareInterface $transaction->ip = $this->di['request']->getClientAddress(); $transaction->ipn = json_encode($ipn); $transaction->note = (isset($data['note'])) ? $data['note'] : NULL; - $transaction->created_at = date('c'); - $transaction->updated_at = date('c'); + $transaction->created_at = date('Y-m-d H:i:s'); + $transaction->updated_at = date('Y-m-d H:i:s'); $newId = $this->di['db']->store($transaction); $this->di['logger']->info('Received transaction %s from payment gateway %s', $newId, $transaction->gateway_id); @@ -368,7 +368,7 @@ class ServiceTransaction implements InjectionAwareInterface $model->status = \Model_Transaction::STATUS_ERROR; $model->error = $e->getMessage(); $model->error_code = $e->getCode(); - $model->updated_at = date('c'); + $model->updated_at = date('Y-m-d H:i:s'); $this->di['db']->store($model); throw $e; } @@ -460,7 +460,7 @@ class ServiceTransaction implements InjectionAwareInterface $transaction->status = \Model_Transaction::STATUS_ERROR; $transaction->error = $e->getMessage(); $transaction->error_code = $e->getCode(); - $transaction->updated_at = date('c'); + $transaction->updated_at = date('Y-m-d H:i:s'); $this->di['db']->store($transaction); if(BB_DEBUG) error_log($e->getMessage()); @@ -475,7 +475,7 @@ class ServiceTransaction implements InjectionAwareInterface if($tx->status == \Model_Transaction::STATUS_PROCESSED) { $tx->error = NULL; $tx->error_code = NULL; - $tx->updated_at = date('c'); + $tx->updated_at = date('Y-m-d H:i:s'); $this->di['db']->store($tx); return true; } @@ -483,7 +483,7 @@ class ServiceTransaction implements InjectionAwareInterface if($this->hasProcessedTransaction($tx)) { $tx->note .= 'Transaction was marked as processed. Transaction with same ID is already processed'; - $tx->updated_at = date('c'); + $tx->updated_at = date('Y-m-d H:i:s'); $this->di['db']->store($tx); $this->_markAsProcessed($tx); @@ -508,7 +508,7 @@ class ServiceTransaction implements InjectionAwareInterface $tx->error = NULL; $tx->error_code = NULL; $tx->status = \Model_Transaction::STATUS_PROCESSED; - $tx->updated_at = date('c'); + $tx->updated_at = date('Y-m-d H:i:s'); $this->di['db']->store($tx); } @@ -591,7 +591,7 @@ class ServiceTransaction implements InjectionAwareInterface } $tx->status = \Model_Transaction::STATUS_APPROVED; - $tx->updated_at = date('c'); + $tx->updated_at = date('Y-m-d H:i:s'); $this->di['db']->store($tx); return $tx; @@ -666,8 +666,8 @@ class ServiceTransaction implements InjectionAwareInterface $s->amount = $tx->amount; $s->currency = $invoice->currency; $s->status = 'active'; - $s->created_at = date('c'); - $s->updated_at = date('c'); + $s->created_at = date('Y-m-d H:i:s'); + $s->updated_at = date('Y-m-d H:i:s'); $this->di['db']->store($s); $this->_markAsProcessed($tx); @@ -736,8 +736,8 @@ class ServiceTransaction implements InjectionAwareInterface $credit->rel_id = $tx->id; $credit->description = "Invoice #".$proforma->id . ' payment received from transaction #'.$tx->id; $credit->amount = $tx->amount; - $credit->created_at = date('c'); - $credit->updated_at = date('c'); + $credit->created_at = date('Y-m-d H:i:s'); + $credit->updated_at = date('Y-m-d H:i:s'); $this->di['db']->store($credit); } diff --git a/src/bb-modules/Kb/Service.php b/src/bb-modules/Kb/Service.php index c48378316..d9ce0045b 100644 --- a/src/bb-modules/Kb/Service.php +++ b/src/bb-modules/Kb/Service.php @@ -137,8 +137,8 @@ class Service $model->slug = $this->di['tools']->slug($title); $model->status = $status; $model->content = $content; - $model->updated_at = date('c'); - $model->created_at = date('c'); + $model->updated_at = date('Y-m-d H:i:s'); + $model->created_at = date('Y-m-d H:i:s'); $id = $this->di['db']->store($model); $this->di['logger']->info('Created new knowledge base article #%s', $id); @@ -177,7 +177,7 @@ class Service if (isset($views)) { $model->views = $views; } - $model->updated_at = date('c'); + $model->updated_at = date('Y-m-d H:i:s'); $this->di['db']->store($model); @@ -298,8 +298,8 @@ class Service $model->title = $title; $model->description = $description; $model->slug = $this->di['tools']->slug($title); - $model->updated_at = date('c'); - $model->created_at = date('c'); + $model->updated_at = date('Y-m-d H:i:s'); + $model->created_at = date('Y-m-d H:i:s'); $id = $this->di['db']->store($model); @@ -322,7 +322,7 @@ class Service $model->description = $description; } - $model->updated_at = date('c'); + $model->updated_at = date('Y-m-d H:i:s'); $this->di['db']->store($model); diff --git a/src/bb-modules/Massmailer/Api/Admin.php b/src/bb-modules/Massmailer/Api/Admin.php index 9a722f46e..b9ae4c16a 100644 --- a/src/bb-modules/Massmailer/Api/Admin.php +++ b/src/bb-modules/Massmailer/Api/Admin.php @@ -93,7 +93,7 @@ class Admin extends \Api_Abstract $model->from_email = $data['from_email']; } - $model->updated_at = date('c'); + $model->updated_at = date('Y-m-d H:i:s'); $this->di['db']->store($model); $this->di['logger']->info('Updated mail message #%s', $model->id); @@ -142,8 +142,8 @@ Order our services at {{ "order"|link }} $model->subject = $data['subject']; $model->content = isset($data['content']) ? $data['content'] : $default_content; $model->status = 'draft'; - $model->created_at = date('c'); - $model->updated_at = date('c'); + $model->created_at = date('Y-m-d H:i:s'); + $model->updated_at = date('Y-m-d H:i:s'); $id = $this->di['db']->store($model); @@ -207,7 +207,7 @@ Order our services at {{ "order"|link }} } $model->status = 'sent'; - $model->sent_at = date('c'); + $model->sent_at = date('Y-m-d H:i:s'); $id = $this->di['db']->store($model); $this->di['logger']->info('Added mass mail messages #%s to queue', $id); @@ -232,8 +232,8 @@ Order our services at {{ "order"|link }} $copy->content = $model->content; $copy->filter = $model->filter; $copy->status = 'draft'; - $copy->created_at = date('c'); - $copy->updated_at = date('c'); + $copy->created_at = date('Y-m-d H:i:s'); + $copy->updated_at = date('Y-m-d H:i:s'); $copyId = $this->di['db']->store($copy); diff --git a/src/bb-modules/News/Api/Admin.php b/src/bb-modules/News/Api/Admin.php index 312d0d05d..6da79da9a 100644 --- a/src/bb-modules/News/Api/Admin.php +++ b/src/bb-modules/News/Api/Admin.php @@ -113,11 +113,11 @@ class Admin extends \Api_Abstract } if(isset($data['created_at'])) { - $model->created_at = date('c', strtotime($data['created_at'])); + $model->created_at = date('Y-m-d H:i:s', strtotime($data['created_at'])); } if(isset($data['updated_at'])) { - $model->updated_at = date('c', strtotime($data['updated_at'])); + $model->updated_at = date('Y-m-d H:i:s', strtotime($data['updated_at'])); } $model->admin_id = $this->getIdentity()->id; @@ -149,8 +149,8 @@ class Admin extends \Api_Abstract $model->slug = $this->di['tools']->slug($data['title']); $model->status = isset($data['status']) ? $data['status'] : NULL; $model->content = isset($data['content']) ? $data['content'] : NULL; - $model->created_at = date('c'); - $model->updated_at = date('c'); + $model->created_at = date('Y-m-d H:i:s'); + $model->updated_at = date('Y-m-d H:i:s'); $this->di['db']->store($model); $this->di['logger']->info('Created news item #%s', $model->id); diff --git a/src/bb-modules/Notification/Service.php b/src/bb-modules/Notification/Service.php index 1ad7c65a3..7f7ca7397 100644 --- a/src/bb-modules/Notification/Service.php +++ b/src/bb-modules/Notification/Service.php @@ -54,8 +54,8 @@ class Service implements InjectionAwareInterface $meta->rel_id = 1; $meta->meta_key = 'message'; $meta->meta_value = $message; - $meta->created_at = date('c'); - $meta->updated_at = date('c'); + $meta->created_at = date('Y-m-d H:i:s'); + $meta->updated_at = date('Y-m-d H:i:s'); $id = $this->di['db']->store($meta); $this->di['events_manager']->fire(array('event' => 'onAfterAdminNotificationAdd', 'params' => array('id' => $id))); diff --git a/src/bb-modules/Order/Service.php b/src/bb-modules/Order/Service.php index 44c8d1f1e..ed2a739a5 100644 --- a/src/bb-modules/Order/Service.php +++ b/src/bb-modules/Order/Service.php @@ -289,8 +289,8 @@ class Service implements InjectionAwareInterface $os->client_order_id = $order->id; $os->status = $order->status; $os->notes = $notes; - $os->created_at = date('c'); - $os->updated_at = date('c'); + $os->created_at = date('Y-m-d H:i:s'); + $os->updated_at = date('Y-m-d H:i:s'); $this->di['db']->store($os); } @@ -583,15 +583,15 @@ class Service implements InjectionAwareInterface } if (isset($data['created_at'])) { - $order->created_at = date('c', strtotime($data['created_at'])); + $order->created_at = date('Y-m-d H:i:s', strtotime($data['created_at'])); } else { - $order->created_at = date('c'); + $order->created_at = date('Y-m-d H:i:s'); } if (isset($data['updated_at'])) { - $order->updated_at = date('c', strtotime($data['updated_at'])); + $order->updated_at = date('Y-m-d H:i:s', strtotime($data['updated_at'])); } else { - $order->updated_at = date('c'); + $order->updated_at = date('Y-m-d H:i:s'); } $id = $this->di['db']->store($order); @@ -603,10 +603,10 @@ class Service implements InjectionAwareInterface $mm = $this->di['db']->dispense('ClientOrderMeta'); $mm->client_order_id = $id; $mm->name = $k; - $mm->created_at = date('c'); + $mm->created_at = date('Y-m-d H:i:s'); } $mm->value = $v; - $mm->updated_at = date('c'); + $mm->updated_at = date('Y-m-d H:i:s'); $this->di['db']->store($mm); } } @@ -694,7 +694,7 @@ class Service implements InjectionAwareInterface } $order->service_id = $service->id; - $order->updated_at = date('c'); + $order->updated_at = date('Y-m-d H:i:s'); $this->di['db']->store($order); } } @@ -715,14 +715,14 @@ class Service implements InjectionAwareInterface $from_time = (NULL === $order->expires_at) ? time() : strtotime($order->expires_at); $period = $this->di['period']($order->period); - $order->expires_at = date('c', $period->getExpirationTime($from_time)); + $order->expires_at = date('Y-m-d H:i:s', $period->getExpirationTime($from_time)); } $order->status = \Model_ClientOrder::STATUS_ACTIVE; - $order->activated_at = date('c'); + $order->activated_at = date('Y-m-d H:i:s'); $order->suspended_at = NULL; $order->canceled_at = NULL; - $order->updated_at = date('c'); + $order->updated_at = date('Y-m-d H:i:s'); $this->di['db']->store($order); $productModel = $this->di['db']->load('Product', $order->product_id); @@ -786,7 +786,7 @@ class Service implements InjectionAwareInterface { if ($product->stock_control) { $product->quantity_in_stock = $product->quantity_in_stock - $qty; - $product->updated_at = date('c'); + $product->updated_at = date('Y-m-d H:i:s'); $this->di['db']->store($product); } @@ -805,15 +805,15 @@ class Service implements InjectionAwareInterface } if (isset($data['created_at']) && !empty($data['created_at'])) { - $order->created_at = date('c', strtotime($data['created_at'])); + $order->created_at = date('Y-m-d H:i:s', strtotime($data['created_at'])); } if (isset($data['activated_at']) && !empty($data['activated_at'])) { - $order->activated_at = date('c', strtotime($data['activated_at'])); + $order->activated_at = date('Y-m-d H:i:s', strtotime($data['activated_at'])); } if (isset($data['expires_at']) && !empty($data['expires_at'])) { - $order->expires_at = date('c', strtotime($data['expires_at'])); + $order->expires_at = date('Y-m-d H:i:s', strtotime($data['expires_at'])); } else if (isset($data['expires_at']) && empty ($data['expires_at'])) { $order->expires_at = NULL; } @@ -852,16 +852,16 @@ class Service implements InjectionAwareInterface $mm = $this->di['db']->dispense('ClientOrderMeta'); $mm->client_order_id = $order->id; $mm->name = $k; - $mm->created_at = date('c'); + $mm->created_at = date('Y-m-d H:i:s'); } $mm->value = $v; - $mm->updated_at = date('c'); + $mm->updated_at = date('Y-m-d H:i:s'); $this->di['db']->store($mm); } } } - $order->updated_at = date('c'); + $order->updated_at = date('Y-m-d H:i:s'); $this->di['db']->store($order); $this->di['events_manager']->fire(array('event' => 'onAfterAdminOrderUpdate', 'params' => array('id' => $order->id))); @@ -922,14 +922,14 @@ class Service implements InjectionAwareInterface } } $period = $this->di['period']($order->period); - $order->expires_at = date('c', $period->getExpirationTime($from_time)); + $order->expires_at = date('Y-m-d H:i:s', $period->getExpirationTime($from_time)); } $order->status = \Model_ClientOrder::STATUS_ACTIVE; $order->suspended_at = NULL; $order->unsuspended_at = NULL; $order->canceled_at = NULL; - $order->updated_at = date('c'); + $order->updated_at = date('Y-m-d H:i:s'); $this->di['db']->store($order); $this->saveStatusChange($order, 'Order renewed'); @@ -947,8 +947,8 @@ class Service implements InjectionAwareInterface $order->status = \Model_ClientOrder::STATUS_SUSPENDED; $order->reason = $reason; - $order->suspended_at = date('c'); - $order->updated_at = date('c'); + $order->suspended_at = date('Y-m-d H:i:s'); + $order->updated_at = date('Y-m-d H:i:s'); $this->di['db']->store($order); $note = (NULL === $reason) ? "Order suspeded" : 'Order suspended for ' . $reason; @@ -970,8 +970,8 @@ class Service implements InjectionAwareInterface $order->status = \Model_ClientOrder::STATUS_ACTIVE; $order->reason = NULL; $order->suspended_at = NULL; - $order->unsuspended_at = date('c'); - $order->updated_at = date('c'); + $order->unsuspended_at = date('Y-m-d H:i:s'); + $order->updated_at = date('Y-m-d H:i:s'); $this->di['db']->store($order); $this->saveStatusChange($order, 'Order unsuspended'); @@ -995,10 +995,10 @@ class Service implements InjectionAwareInterface $order->status = \Model_ClientOrder::STATUS_CANCELED; $order->reason = $reason; - $order->canceled_at = date('c'); + $order->canceled_at = date('Y-m-d H:i:s'); $order->expires_at = NULL; $order->suspended_at = NULL; - $order->updated_at = date('c'); + $order->updated_at = date('Y-m-d H:i:s'); $this->di['db']->store($order); $note = (NULL === $reason) ? "Order canceled" : 'Canceled order for ' . $reason; @@ -1021,16 +1021,16 @@ class Service implements InjectionAwareInterface if ($order->period) { $period = $this->di['period']($order->period); $expires_at = $period->getExpirationTime(time()); - $expires_at = date('c', $expires_at); + $expires_at = date('Y-m-d H:i:s', $expires_at); } $order->status = \Model_ClientOrder::STATUS_ACTIVE; $order->reason = NULL; - $order->activated_at = date('c'); + $order->activated_at = date('Y-m-d H:i:s'); $order->expires_at = $expires_at; $order->suspended_at = NULL; $order->canceled_at = NULL; - $order->updated_at = date('c'); + $order->updated_at = date('Y-m-d H:i:s'); $this->di['db']->store($order); $this->saveStatusChange($order, 'Activated canceled order'); @@ -1179,7 +1179,7 @@ class Service implements InjectionAwareInterface $oldConfig = $order->config; $order->config = json_encode($config); - $order->updated_at = date('c'); + $order->updated_at = date('Y-m-d H:i:s'); $this->di['db']->store($order); $this->di['logger']->info(sprintf("Order #%s config changes:\n%s\n%s", $order->id, $oldConfig, $order->config)); @@ -1217,8 +1217,8 @@ class Service implements InjectionAwareInterface $bean->client_order_id = $order->id; $bean->status = $status; $bean->notes = $notes; - $bean->created_at = date('c'); - $bean->updated_at = date('c'); + $bean->created_at = date('Y-m-d H:i:s'); + $bean->updated_at = date('Y-m-d H:i:s'); $id = $this->di['db']->store($bean); $this->di['logger']->info('Added order status history message to order #%s', $id); @@ -1274,14 +1274,14 @@ class Service implements InjectionAwareInterface public function setUnpaidInvoice(\Model_ClientOrder $order, \Model_Invoice $proforma) { $order->unpaid_invoice_id = $proforma->id; - $order->updated_at = date('c'); + $order->updated_at = date('Y-m-d H:i:s'); $this->di['db']->store($order); } public function unsetUnpaidInvoice(\Model_ClientOrder $order) { $order->unpaid_invoice_id = NULL; - $order->updated_at = date('c'); + $order->updated_at = date('Y-m-d H:i:s'); $this->di['db']->store($order); } diff --git a/src/bb-modules/Product/Service.php b/src/bb-modules/Product/Service.php index 61ea9e3ca..87291fa5b 100644 --- a/src/bb-modules/Product/Service.php +++ b/src/bb-modules/Product/Service.php @@ -191,8 +191,8 @@ class Service implements InjectionAwareInterface $model->setup = self::SETUP_AFTER_PAYMENT; $model->priority = $priority + 10; - $model->updated_at = date('c'); - $model->created_at = date('c'); + $model->updated_at = date('Y-m-d H:i:s'); + $model->created_at = date('Y-m-d H:i:s'); // try save with slug try { @@ -352,7 +352,7 @@ class Service implements InjectionAwareInterface $model->plugin = $data['plugin']; } - $model->updated_at = date('c'); + $model->updated_at = date('Y-m-d H:i:s'); $this->di['db']->store($model); @@ -366,7 +366,7 @@ class Service implements InjectionAwareInterface $model = $this->di['db']->load('Product', $id); if($model instanceof \Model_Product) { $model->priority = $p; - $model->updated_at = date('c'); + $model->updated_at = date('Y-m-d H:i:s'); $this->di['db']->store($model); } } @@ -398,7 +398,7 @@ class Service implements InjectionAwareInterface } $model->config = json_encode($config); - $model->updated_at = date('c'); + $model->updated_at = date('Y-m-d H:i:s'); $this->di['db']->store($model); $this->di['logger']->info('Updated product #%s configuration', $model->id); @@ -439,8 +439,8 @@ class Service implements InjectionAwareInterface $model->icon_url = $iconUrl; $model->description = $description; - $model->updated_at = date('c'); - $model->created_at = date('c'); + $model->updated_at = date('Y-m-d H:i:s'); + $model->created_at = date('Y-m-d H:i:s'); // try save with slug try { @@ -485,7 +485,7 @@ class Service implements InjectionAwareInterface $productCategory->icon_url = $icon_url; $productCategory->description = $description; - $productCategory->updated_at = date('c'); + $productCategory->updated_at = date('Y-m-d H:i:s'); $this->di['db']->store($productCategory); $this->di['logger']->info('Updated product category #%s', $productCategory->id); @@ -502,8 +502,8 @@ class Service implements InjectionAwareInterface $model->title = $title; $model->description = $description; $model->icon_url = $icon_url; - $model->updated_at = date('c'); - $model->created_at = date('c'); + $model->updated_at = date('Y-m-d H:i:s'); + $model->created_at = date('Y-m-d H:i:s'); $id = $this->di['db']->store($model); $this->di['logger']->info('Created new product category #%s', $id); @@ -583,15 +583,15 @@ class Service implements InjectionAwareInterface $model->once_per_client = isset($data['once_per_client']) ? (bool)$data['once_per_client'] : 0; $model->recurring = isset($data['recurring']) ? (bool)$data['recurring'] : 0; $model->maxuses = isset($data['maxuses']) ? $data['maxuses'] : NULL; - $model->start_at = (isset($data['start_at']) && !empty($data['start_at'])) ? date('c', strtotime($data['start_at'])) : NULL; - $model->end_at = (isset($data['end_at']) && !empty($data['end_at'])) ? date('c', strtotime($data['end_at'])) : NULL; + $model->start_at = (isset($data['start_at']) && !empty($data['start_at'])) ? date('Y-m-d H:i:s', strtotime($data['start_at'])) : NULL; + $model->end_at = (isset($data['end_at']) && !empty($data['end_at'])) ? date('Y-m-d H:i:s', strtotime($data['end_at'])) : NULL; $model->products = json_encode($products); $model->periods = json_encode($periods); $model->client_groups = json_encode($clientGroups); - $model->updated_at = date('c'); - $model->created_at = date('c'); + $model->updated_at = date('Y-m-d H:i:s'); + $model->created_at = date('Y-m-d H:i:s'); $promoId = $this->di['db']->store($model); $this->di['logger']->info('Created new promo code %s', $model->code); @@ -657,7 +657,7 @@ class Service implements InjectionAwareInterface if(empty ($data['start_at'])) { $model->start_at = NULL; } else { - $model->start_at = date('c', strtotime($data['start_at'])); + $model->start_at = date('Y-m-d H:i:s', strtotime($data['start_at'])); } } @@ -665,7 +665,7 @@ class Service implements InjectionAwareInterface if(empty ($data['end_at'])) { $model->end_at = NULL; } else { - $model->end_at = date('c', strtotime($data['end_at'])); + $model->end_at = date('Y-m-d H:i:s', strtotime($data['end_at'])); } } @@ -689,7 +689,7 @@ class Service implements InjectionAwareInterface $model->periods = json_encode($data['periods']); } - $model->updated_at = date('c'); + $model->updated_at = date('Y-m-d H:i:s'); $this->di['db']->store($model); $this->di['logger']->info('Update promo code %s', $model->code); diff --git a/src/bb-modules/Profile/Service.php b/src/bb-modules/Profile/Service.php index 9b6af70a5..24eb6bfdb 100644 --- a/src/bb-modules/Profile/Service.php +++ b/src/bb-modules/Profile/Service.php @@ -36,7 +36,7 @@ class Service implements InjectionAwareInterface $this->di['events_manager']->fire(array('event' => 'onBeforeAdminStaffProfilePasswordChange', 'params' => $event_params)); $admin->pass = $this->di['password']->hashIt($new_password); - $admin->updated_at = date('c'); + $admin->updated_at = date('Y-m-d H:i:s'); $this->di['db']->store($admin); $event_params = array(); @@ -55,7 +55,7 @@ class Service implements InjectionAwareInterface $this->di['events_manager']->fire(array('event' => 'onBeforeAdminStaffApiKeyChange', 'params' => $event_params)); $admin->api_token = $this->di['tools']->generatePassword(32); - $admin->updated_at = date('c'); + $admin->updated_at = date('Y-m-d H:i:s'); $this->di['db']->store($admin); $this->di['events_manager']->fire(array('event' => 'onAfterAdminStaffApiKeyChange', 'params' => $event_params)); @@ -83,7 +83,7 @@ class Service implements InjectionAwareInterface $admin->signature = $data['signature']; } - $admin->updated_at = date('c'); + $admin->updated_at = date('Y-m-d H:i:s'); $this->di['db']->store($admin); $event_params = array(); @@ -255,7 +255,7 @@ class Service implements InjectionAwareInterface $client->custom_10 = $data['custom_10']; } - $client->updated_at = date('c'); + $client->updated_at = date('Y-m-d H:i:s'); $this->di['db']->store($client); @@ -269,7 +269,7 @@ class Service implements InjectionAwareInterface public function resetApiKey(\Model_Client $client) { $client->api_token = $this->di['tools']->generatePassword(32); - $client->updated_at = date('c'); + $client->updated_at = date('Y-m-d H:i:s'); $this->di['db']->store($client); diff --git a/src/bb-modules/Queue/Api/Admin.php b/src/bb-modules/Queue/Api/Admin.php index 2a3850481..74d3f899a 100644 --- a/src/bb-modules/Queue/Api/Admin.php +++ b/src/bb-modules/Queue/Api/Admin.php @@ -112,11 +112,11 @@ class Admin extends \Api_Abstract $q = $this->di['db']->dispense('queue'); $q->name = $data['queue']; $q->mod = $data['mod']; - $q->created_at = date('c'); + $q->created_at = date('Y-m-d H:i:s'); } $q->timeout = $interval; $q->iteration = $max; - $q->updated_at = date('c'); + $q->updated_at = date('Y-m-d H:i:s'); $this->di['db']->store($q); $params = isset($data['params']) ? $data['params'] : null; @@ -127,11 +127,11 @@ class Admin extends \Api_Abstract $msg->handler = $handler; $msg->body = $body; $msg->hash = md5($body); - $msg->created_at = date('c'); - $msg->updated_at = date('c'); + $msg->created_at = date('Y-m-d H:i:s'); + $msg->updated_at = date('Y-m-d H:i:s'); if(isset($data['execute_at'])) { - $msg->execute_at = date('c', strtotime($data['execute_at'])); + $msg->execute_at = date('Y-m-d H:i:s', strtotime($data['execute_at'])); } $this->di['db']->store($msg); @@ -223,7 +223,7 @@ class Admin extends \Api_Abstract $this->di['db']->exec($dsql, array('id'=>$msg['id'])); $result[$msg['id']] = array('status'=> 'executed', 'error'=>null); } catch(\Exception $e) { - $this->di['db']->exec($lsql, array('log'=>$e->getMessage(). ' '. $e->getCode(), 'id'=>$msg['id'], 'u'=>date('c'))); + $this->di['db']->exec($lsql, array('log'=>$e->getMessage(). ' '. $e->getCode(), 'id'=>$msg['id'], 'u'=>date('Y-m-d H:i:s'))); $this->di['logger']->info(sprintf('Error executing queue %s message #%s %s', $q->name, $msg['id'], $e->getMessage())); $result[$msg['id']] = array('status'=> 'fail', 'error' => $e->getMessage()); } diff --git a/src/bb-modules/Redirect/Api/Admin.php b/src/bb-modules/Redirect/Api/Admin.php index 51c222136..81034cc44 100644 --- a/src/bb-modules/Redirect/Api/Admin.php +++ b/src/bb-modules/Redirect/Api/Admin.php @@ -71,8 +71,8 @@ class Admin extends \Api_Abstract $bean->extension = 'mod_redirect'; $bean->meta_key = trim($data['path'], '/'); $bean->meta_value = trim($data['target'], '/'); - $bean->created_at = date('c'); - $bean->updated_at = date('c'); + $bean->created_at = date('Y-m-d H:i:s'); + $bean->updated_at = date('Y-m-d H:i:s'); $this->di['db']->store($bean); $id = $bean->id; @@ -107,7 +107,7 @@ class Admin extends \Api_Abstract $bean->meta_value = $data['target']; } - $bean->updated_at = date('c'); + $bean->updated_at = date('Y-m-d H:i:s'); $this->di['db']->store($bean); $this->di['logger']->info('Updated redirect #%s', $data['id']); diff --git a/src/bb-modules/Seo/Service.php b/src/bb-modules/Seo/Service.php index edbdd2960..0d0a782e2 100644 --- a/src/bb-modules/Seo/Service.php +++ b/src/bb-modules/Seo/Service.php @@ -64,7 +64,7 @@ class Service implements InjectionAwareInterface error_log('Submitted sitemap to Bing'); } - $api->system_update_params(array($key => date('c'))); + $api->system_update_params(array($key => date('Y-m-d H:i:s'))); return true; } diff --git a/src/bb-modules/Serviceboxbillinglicense/Api/Admin.php b/src/bb-modules/Serviceboxbillinglicense/Api/Admin.php index 26ef47b09..497b69a20 100644 --- a/src/bb-modules/Serviceboxbillinglicense/Api/Admin.php +++ b/src/bb-modules/Serviceboxbillinglicense/Api/Admin.php @@ -132,7 +132,7 @@ class Admin extends \Api_Abstract $service->oid = $data['oid']; } - $service->updated_at = date('c'); + $service->updated_at = date('Y-m-d H:i:s'); $this->di['db']->store($service); $this->di['logger']->info('Updated BoxBilling license %s details', $service->id); diff --git a/src/bb-modules/Serviceboxbillinglicense/Service.php b/src/bb-modules/Serviceboxbillinglicense/Service.php index 50dda50b5..69537878b 100644 --- a/src/bb-modules/Serviceboxbillinglicense/Service.php +++ b/src/bb-modules/Serviceboxbillinglicense/Service.php @@ -82,8 +82,8 @@ class Service implements InjectionAwareInterface $c->extension = 'mod_serviceboxbillinglicense'; $c->meta_key = 'config'; $c->meta_value = null; - $c->created_at = date('c'); - $c->updated_at = date('c'); + $c->created_at = date('Y-m-d H:i:s'); + $c->updated_at = date('Y-m-d H:i:s'); $this->di['db']->store($c); } $config = json_decode($c->meta_value, 1); @@ -101,8 +101,8 @@ class Service implements InjectionAwareInterface { $model = $this->di['db']->dispense('service_boxbillinglicense'); $model->client_id = $order->client_id; - $model->created_at = date('c'); - $model->updated_at = date('c'); + $model->created_at = date('Y-m-d H:i:s'); + $model->updated_at = date('Y-m-d H:i:s'); $this->di['db']->store($model); return $model; } @@ -120,7 +120,7 @@ class Service implements InjectionAwareInterface $result = $this->_getApi()->partner_order_create(); $model->oid = $result; - $model->updated_at = date('c'); + $model->updated_at = date('Y-m-d H:i:s'); $this->di['db']->store($model); return true; @@ -139,7 +139,7 @@ class Service implements InjectionAwareInterface } $this->_getApi()->partner_order_suspend($model->vserverid); - $model->updated_at = date('c'); + $model->updated_at = date('Y-m-d H:i:s'); $this->di['db']->store($model); return true; } @@ -155,7 +155,7 @@ class Service implements InjectionAwareInterface } $this->_getApi()->partner_order_unsuspend($model->vserverid); - $model->updated_at = date('c'); + $model->updated_at = date('Y-m-d H:i:s'); $this->di['db']->store($model); return true; } diff --git a/src/bb-modules/Servicecentovacast/Api/Admin.php b/src/bb-modules/Servicecentovacast/Api/Admin.php index cb30aaca7..ac8c42042 100644 --- a/src/bb-modules/Servicecentovacast/Api/Admin.php +++ b/src/bb-modules/Servicecentovacast/Api/Admin.php @@ -54,8 +54,8 @@ class Admin extends \Api_Abstract $bean->extension = 'mod_servicecentovacast'; $bean->meta_key = 'server'; $bean->meta_value = json_encode($data); - $bean->created_at = date('c'); - $bean->updated_at = date('c'); + $bean->created_at = date('Y-m-d H:i:s'); + $bean->updated_at = date('Y-m-d H:i:s'); $this->di['db']->store($bean); $this->di['logger']->info('Added new CentovaCast server %s', $bean->id); @@ -89,7 +89,7 @@ class Admin extends \Api_Abstract $server = $this->server_get($data); $bean = $this->di['db']->findOne('extension_meta', 'id = :id', array('id'=>$server['id'])); $bean->meta_value = json_encode($data); - $bean->updated_at = date('c'); + $bean->updated_at = date('Y-m-d H:i:s'); $this->di['db']->store($bean); $this->di['logger']->info('Updated CentovaCast server %s', $server['id']); @@ -149,7 +149,7 @@ class Admin extends \Api_Abstract $s->pass = $this->getService()->encryptPass($data['pass']); } - $s->updated_at = date('c'); + $s->updated_at = date('Y-m-d H:i:s'); $this->di['db']->store($s); $this->di['logger']->info('Updated CentovaCast service %s details', $s->id); diff --git a/src/bb-modules/Servicecentovacast/Service.php b/src/bb-modules/Servicecentovacast/Service.php index bd9d8fa49..60b2da10c 100644 --- a/src/bb-modules/Servicecentovacast/Service.php +++ b/src/bb-modules/Servicecentovacast/Service.php @@ -107,8 +107,8 @@ class Service implements \Box\InjectionAwareInterface { $model = $this->di['db']->dispense('service_centovacast'); $model->client_id = $order->client_id; - $model->created_at = date('c'); - $model->updated_at = date('c'); + $model->created_at = date('Y-m-d H:i:s'); + $model->updated_at = date('Y-m-d H:i:s'); $this->di['db']->store($model); return $model; } @@ -188,7 +188,7 @@ class Service implements \Box\InjectionAwareInterface $model->server_id = $pc['server_id']; $model->username = $username; $model->pass = $this->encryptPass($password); - $model->updated_at = date('c'); + $model->updated_at = date('Y-m-d H:i:s'); $this->di['db']->store($model); return array_merge($params, array('server'=>$server)); @@ -224,7 +224,7 @@ class Service implements \Box\InjectionAwareInterface ); $this->_apiSystemCall($server, 'setstatus', $params); - $model->updated_at = date('c'); + $model->updated_at = date('Y-m-d H:i:s'); $this->di['db']->store($model); return true; } @@ -246,7 +246,7 @@ class Service implements \Box\InjectionAwareInterface ); $this->_apiSystemCall($server, 'setstatus', $params); - $model->updated_at = date('c'); + $model->updated_at = date('Y-m-d H:i:s'); $this->di['db']->store($model); return true; } diff --git a/src/bb-modules/Servicecustom/Service.php b/src/bb-modules/Servicecustom/Service.php index 99041dd18..786b449d9 100644 --- a/src/bb-modules/Servicecustom/Service.php +++ b/src/bb-modules/Servicecustom/Service.php @@ -70,8 +70,8 @@ class Service implements \Box\InjectionAwareInterface $model->plugin = $product->plugin; $model->plugin_config = $product->plugin_config; $model->config = $order->config; - $model->created_at = date('c'); - $model->updated_at = date('c'); + $model->created_at = date('Y-m-d H:i:s'); + $model->updated_at = date('Y-m-d H:i:s'); $this->di['db']->store($model); return $model; @@ -104,7 +104,7 @@ class Service implements \Box\InjectionAwareInterface $model = $this->_getOrderService($order); $this->callOnAdapter($model, 'renew'); - $model->updated_at = date('c'); + $model->updated_at = date('Y-m-d H:i:s'); $this->di['db']->store($model); @@ -122,7 +122,7 @@ class Service implements \Box\InjectionAwareInterface $this->callOnAdapter($model, 'suspend'); - $model->updated_at = date('c'); + $model->updated_at = date('Y-m-d H:i:s'); $this->di['db']->store($model); @@ -140,7 +140,7 @@ class Service implements \Box\InjectionAwareInterface $this->callOnAdapter($model, 'unsuspend'); - $model->updated_at = date('c'); + $model->updated_at = date('Y-m-d H:i:s'); $this->di['db']->store($model); @@ -158,7 +158,7 @@ class Service implements \Box\InjectionAwareInterface $this->callOnAdapter($model, 'cancel'); - $model->updated_at = date('c'); + $model->updated_at = date('Y-m-d H:i:s'); $this->di['db']->store($model); @@ -176,7 +176,7 @@ class Service implements \Box\InjectionAwareInterface $this->callOnAdapter($model, 'uncancel'); - $model->updated_at = date('c'); + $model->updated_at = date('Y-m-d H:i:s'); $this->di['db']->store($model); @@ -245,7 +245,7 @@ class Service implements \Box\InjectionAwareInterface $model = $this->getServiceCustomByOrderId($orderId); $model->config = json_encode($config); - $model->updated_at = date('c'); + $model->updated_at = date('Y-m-d H:i:s'); $this->di['db']->store($model); diff --git a/src/bb-modules/Servicedomain/Service.php b/src/bb-modules/Servicedomain/Service.php index b2b45f8c2..32fbec5f3 100644 --- a/src/bb-modules/Servicedomain/Service.php +++ b/src/bb-modules/Servicedomain/Service.php @@ -208,8 +208,8 @@ class Service implements \Box\InjectionAwareInterface $model->contact_phone_cc = $client->phone_cc; $model->contact_phone = $client->phone; - $model->created_at = date('c'); - $model->updated_at = date('c'); + $model->created_at = date('Y-m-d H:i:s'); + $model->updated_at = date('Y-m-d H:i:s'); $this->di['db']->store($model); @@ -372,9 +372,9 @@ class Service implements \Box\InjectionAwareInterface $model->contact_phone = $contact->getTel(); $model->details = serialize($whois); - $model->expires_at = date('c', $whois->getExpirationTime()); - $model->registered_at = date('c', $whois->getRegistrationTime()); - $model->updated_at = date('c'); + $model->expires_at = date('Y-m-d H:i:s', $whois->getExpirationTime()); + $model->registered_at = date('Y-m-d H:i:s', $whois->getRegistrationTime()); + $model->updated_at = date('Y-m-d H:i:s'); $this->di['db']->store($model); } @@ -405,7 +405,7 @@ class Service implements \Box\InjectionAwareInterface $model->ns2 = $ns2; $model->ns3 = $ns3; $model->ns4 = $ns4; - $model->updated_at = date('c'); + $model->updated_at = date('Y-m-d H:i:s'); $id = $this->di['db']->store($model); @@ -459,7 +459,7 @@ class Service implements \Box\InjectionAwareInterface list($domain, $adapter) = $this->_getD($model); $adapter->modifyContact($domain); - $model->updated_at = date('c'); + $model->updated_at = date('Y-m-d H:i:s'); $id = $this->di['db']->store($model); @@ -484,7 +484,7 @@ class Service implements \Box\InjectionAwareInterface $epp = $adapter->lock($domain); $model->locked = true; - $model->updated_at = date('c'); + $model->updated_at = date('Y-m-d H:i:s'); $id = $this->di['db']->store($model); @@ -500,7 +500,7 @@ class Service implements \Box\InjectionAwareInterface $epp = $adapter->unlock($domain); $model->locked = false; - $model->updated_at = date('c'); + $model->updated_at = date('Y-m-d H:i:s'); $id = $this->di['db']->store($model); @@ -516,7 +516,7 @@ class Service implements \Box\InjectionAwareInterface $adapter->enablePrivacyProtection($domain); $model->privacy = TRUE; - $model->updated_at = date('c'); + $model->updated_at = date('Y-m-d H:i:s'); $id = $this->di['db']->store($model); @@ -532,7 +532,7 @@ class Service implements \Box\InjectionAwareInterface $adapter->disablePrivacyProtection($domain); $model->privacy = FALSE; - $model->updated_at = date('c'); + $model->updated_at = date('Y-m-d H:i:s'); $id = $this->di['db']->store($model); @@ -765,7 +765,7 @@ class Service implements \Box\InjectionAwareInterface } } - $ss->setParamValue($key, date('c')); + $ss->setParamValue($key, date('Y-m-d H:i:s')); $this->di['logger']->info('Executed action to synchronize domain expiration dates with registrar'); return true; @@ -782,8 +782,8 @@ class Service implements \Box\InjectionAwareInterface $model->min_years = isset($data['min_years']) ? (int)$data['min_years'] : 1; $model->allow_register = isset($data['allow_register']) ? (bool)$data['allow_transfer'] : true; $model->active = isset($data['active']) ? (bool)$data['active'] : false; - $model->updated_at = date('c'); - $model->created_at = date('c'); + $model->updated_at = date('Y-m-d H:i:s'); + $model->created_at = date('Y-m-d H:i:s'); $id = $this->di['db']->store($model); @@ -826,7 +826,7 @@ class Service implements \Box\InjectionAwareInterface $model->active = $data['active']; } - $model->updated_at = date('c'); + $model->updated_at = date('Y-m-d H:i:s'); $this->di['db']->store($model); @@ -1121,7 +1121,7 @@ class Service implements \Box\InjectionAwareInterface $s->transfer_code = $data['transfer_code']; } - $s->updated_at = date('c'); + $s->updated_at = date('Y-m-d H:i:s'); $this->di['db']->store($s); diff --git a/src/bb-modules/Servicedownloadable/Service.php b/src/bb-modules/Servicedownloadable/Service.php index 2d3094f52..5d5c0dfcd 100644 --- a/src/bb-modules/Servicedownloadable/Service.php +++ b/src/bb-modules/Servicedownloadable/Service.php @@ -69,8 +69,8 @@ class Service implements InjectionAwareInterface $model->client_id = $order->client_id; $model->filename = $c['filename']; $model->downloads = 0; - $model->created_at = date('c'); - $model->updated_at = date('c'); + $model->created_at = date('Y-m-d H:i:s'); + $model->updated_at = date('Y-m-d H:i:s'); $this->di['db']->store($model); return $model; @@ -154,7 +154,7 @@ class Service implements InjectionAwareInterface public function hitDownload(\Model_ServiceDownloadable $model) { $model->downloads += 1; - $model->updated_at = date('c'); + $model->updated_at = date('Y-m-d H:i:s'); $this->di['db']->store($model); } @@ -191,7 +191,7 @@ class Service implements InjectionAwareInterface $config['filename'] = $file->getName(); $productModel->config = json_encode($config); - $productModel->updated_at = date('c'); + $productModel->updated_at = date('Y-m-d H:i:s'); $this->di['db']->store($productModel); $this->di['logger']->info('Uploaded new file for product %s', $productModel->id); @@ -217,7 +217,7 @@ class Service implements InjectionAwareInterface // End upload $serviceDownloadable->filename = $file->getName(); - $serviceDownloadable->updated_at = date('c'); + $serviceDownloadable->updated_at = date('Y-m-d H:i:s'); $this->di['db']->store($serviceDownloadable); $this->di['logger']->info('Uploaded new file for order %s', $order->id); diff --git a/src/bb-modules/Servicehosting/Service.php b/src/bb-modules/Servicehosting/Service.php index 2bb417dcd..304ec1f73 100644 --- a/src/bb-modules/Servicehosting/Service.php +++ b/src/bb-modules/Servicehosting/Service.php @@ -94,8 +94,8 @@ class Service implements InjectionAwareInterface $model->tld = $c['tld']; $model->ip = $server->ip; $model->reseller = isset($c['reseller']) ? $c['reseller'] : FALSE; - $model->created_at = date('c'); - $model->updated_at = date('c'); + $model->created_at = date('Y-m-d H:i:s'); + $model->updated_at = date('Y-m-d H:i:s'); $this->di['db']->store($model); return $model; @@ -152,7 +152,7 @@ class Service implements InjectionAwareInterface } //@todo ? - $model->updated_at = date('c'); + $model->updated_at = date('Y-m-d H:i:s'); $this->di['db']->store($model); return true; } @@ -171,7 +171,7 @@ class Service implements InjectionAwareInterface list($adapter, $account) = $this->_getAM($model); $adapter->suspendAccount($account); - $model->updated_at = date('c'); + $model->updated_at = date('Y-m-d H:i:s'); $this->di['db']->store($model); return true; } @@ -190,7 +190,7 @@ class Service implements InjectionAwareInterface list($adapter, $account) = $this->_getAM($model); $adapter->unsuspendAccount($account); - $model->updated_at = date('c'); + $model->updated_at = date('Y-m-d H:i:s'); $this->di['db']->store($model); return true; } @@ -209,7 +209,7 @@ class Service implements InjectionAwareInterface list($adapter, $account) = $this->_getAM($model); $adapter->cancelAccount($account); - $model->updated_at = date('c'); + $model->updated_at = date('Y-m-d H:i:s'); $this->di['db']->store($model); return true; } @@ -250,7 +250,7 @@ class Service implements InjectionAwareInterface } $model->service_hosting_hp_id = $hp->id; - $model->updated_at = date('c'); + $model->updated_at = date('Y-m-d H:i:s'); $this->di['db']->store($model); $this->di['logger']->info('Changed hosting plan of account #%s', $model->id); return TRUE; @@ -270,7 +270,7 @@ class Service implements InjectionAwareInterface } $model->username = $u; - $model->updated_at = date('c'); + $model->updated_at = date('Y-m-d H:i:s'); $this->di['db']->store($model); $this->di['logger']->info('Changed hosting account %s username', $model->id); @@ -291,7 +291,7 @@ class Service implements InjectionAwareInterface } $model->ip = $ip; - $model->updated_at = date('c'); + $model->updated_at = date('Y-m-d H:i:s'); $this->di['db']->store($model); $this->di['logger']->info('Changed hosting account %s ip', $model->id); return TRUE; @@ -314,7 +314,7 @@ class Service implements InjectionAwareInterface $model->sld = $sld; $model->tld = $tld; - $model->updated_at = date('c'); + $model->updated_at = date('Y-m-d H:i:s'); $this->di['db']->store($model); $this->di['logger']->info('Changed hosting account %s domain', $model->id); return TRUE; @@ -335,7 +335,7 @@ class Service implements InjectionAwareInterface } $model->pass = $p; - $model->updated_at = date('c'); + $model->updated_at = date('Y-m-d H:i:s'); $this->di['db']->store($model); $this->di['logger']->info('Changed hosting account %s password', $model->id); return TRUE; @@ -354,7 +354,7 @@ class Service implements InjectionAwareInterface $model->ip = $updated->getIp(); } - $model->updated_at = date('c'); + $model->updated_at = date('Y-m-d H:i:s'); $this->di['db']->store($model); $this->di['logger']->info('Synchronizing hosting account %s with server', $model->id); return TRUE; @@ -550,7 +550,7 @@ class Service implements InjectionAwareInterface $model->ip = $data['ip']; } - $model->updated_at = date('c'); + $model->updated_at = date('Y-m-d H:i:s'); $this->di['db']->store($model); $this->di['logger']->info('Updated hosting account %s without sending actions to server', $model->id); @@ -644,8 +644,8 @@ class Service implements InjectionAwareInterface $model->port = isset($extras['port']) ? $extras['port'] : NULL; $model->secure = isset($extras['secure']) ? $extras['secure'] : 0; - $model->created_at = date('c'); - $model->updated_at = date('c'); + $model->created_at = date('Y-m-d H:i:s'); + $model->updated_at = date('Y-m-d H:i:s'); $newId = $this->di['db']->store($model); $this->di['logger']->info('Added new hosting server %s', $newId); @@ -732,7 +732,7 @@ class Service implements InjectionAwareInterface $model->secure = $data['secure']; } - $model->updated_at = date('c'); + $model->updated_at = date('Y-m-d H:i:s'); $this->di['db']->store($model); $this->di['logger']->info('Update hosting server %s', $model->id); @@ -878,7 +878,7 @@ class Service implements InjectionAwareInterface } $model->config = json_encode($config); - $model->updated_at = date('c'); + $model->updated_at = date('Y-m-d H:i:s'); $this->di['db']->store($model); $this->di['logger']->info('Updated hosting plan %s', $model->id); @@ -900,8 +900,8 @@ class Service implements InjectionAwareInterface $model->max_sql = isset($data['max_sql']) ? $data['max_sql'] : 1; $model->max_ftp = isset($data['max_ftp']) ? $data['max_ftp'] : 1; - $model->created_at = date('c'); - $model->updated_at = date('c'); + $model->created_at = date('Y-m-d H:i:s'); + $model->updated_at = date('Y-m-d H:i:s'); $newId = $this->di['db']->store($model); $this->di['logger']->info('Added new hosting plan %s', $newId); diff --git a/src/bb-modules/Servicelicense/Server.php b/src/bb-modules/Servicelicense/Server.php index 7708a20fd..28f2f2bd1 100644 --- a/src/bb-modules/Servicelicense/Server.php +++ b/src/bb-modules/Servicelicense/Server.php @@ -110,7 +110,7 @@ class Server implements \Box\InjectionAwareInterface throw new \LogicException('Your license key is not valid.', 1005); } - $model->pinged_at = date('c'); + $model->pinged_at = date('Y-m-d H:i:s'); $this->di['db']->store($model); if (!isset($data['host']) || empty($data['host'])) { diff --git a/src/bb-modules/Servicelicense/Service.php b/src/bb-modules/Servicelicense/Service.php index f5c78abba..1966542be 100644 --- a/src/bb-modules/Servicelicense/Service.php +++ b/src/bb-modules/Servicelicense/Service.php @@ -104,8 +104,8 @@ class Service implements InjectionAwareInterface $model->hosts = NULL; $model->paths = NULL; - $model->created_at = date('c'); - $model->updated_at = date('c'); + $model->created_at = date('Y-m-d H:i:s'); + $model->updated_at = date('Y-m-d H:i:s'); $this->di['db']->store($model); return $model; @@ -135,7 +135,7 @@ class Service implements InjectionAwareInterface } $model->license_key = $plugin->generate($model, $order, $c); - $model->updated_at = date('c'); + $model->updated_at = date('Y-m-d H:i:s'); $this->di['db']->store($model); return true; } @@ -214,7 +214,7 @@ class Service implements InjectionAwareInterface $model->hosts = json_encode(array()); $model->paths = json_encode(array()); $model->versions = json_encode(array()); - $model->updated_at = date('c'); + $model->updated_at = date('Y-m-d H:i:s'); $this->di['db']->store($model); $this->di['logger']->info('Reset license %s information', $model->id); return true; @@ -320,7 +320,7 @@ class Service implements InjectionAwareInterface if($o instanceof \Model_ClientOrder) { return $o->expires_at; } - return date('c'); + return date('Y-m-d H:i:s'); } public function toApiArray(\Model_ServiceLicense $model, $deep = false, $identity = null) @@ -353,7 +353,7 @@ class Service implements InjectionAwareInterface $allowed[] = $value; $model->{$key} = json_encode(array_unique($allowed)); - $model->updated_at = date('c'); + $model->updated_at = date('Y-m-d H:i:s'); $this->di['db']->store($model); } @@ -404,7 +404,7 @@ class Service implements InjectionAwareInterface } } - $s->updated_at = date('c'); + $s->updated_at = date('Y-m-d H:i:s'); $this->di['db']->store($s); return true; diff --git a/src/bb-modules/Servicemembership/Service.php b/src/bb-modules/Servicemembership/Service.php index 1c2c8c1f8..96cc127dd 100644 --- a/src/bb-modules/Servicemembership/Service.php +++ b/src/bb-modules/Servicemembership/Service.php @@ -51,8 +51,8 @@ class Service implements \Box\InjectionAwareInterface $model->client_id = $order->client_id; $model->config = $order->config; - $model->created_at = date('c'); - $model->updated_at = date('c'); + $model->created_at = date('Y-m-d H:i:s'); + $model->updated_at = date('Y-m-d H:i:s'); $this->di['db']->store($model); diff --git a/src/bb-modules/Servicesolusvm/Api/Admin.php b/src/bb-modules/Servicesolusvm/Api/Admin.php index e01bb06ec..cfe159b9a 100644 --- a/src/bb-modules/Servicesolusvm/Api/Admin.php +++ b/src/bb-modules/Servicesolusvm/Api/Admin.php @@ -470,8 +470,8 @@ class Admin extends \Api_Abstract $model->consoleuser = null; $model->consolepassword = null; $model->mainipaddress = $server['ipaddress']; - $model->created_at = date('c'); - $model->updated_at = date('c'); + $model->created_at = date('Y-m-d H:i:s'); + $model->updated_at = date('Y-m-d H:i:s'); $this->di['db']->store($model); //activate order @@ -521,7 +521,7 @@ class Admin extends \Api_Abstract 'last_name' => $client['lastname'], 'password' => $password, 'notes' => 'Imported from SolusVM server', - 'created_at' => date('c', strtotime($client['created'])), + 'created_at' => date('Y-m-d H:i:s', strtotime($client['created'])), ); try { $id = $this->di['api_admin']->client_create($cdata); diff --git a/src/bb-modules/Servicesolusvm/Service.php b/src/bb-modules/Servicesolusvm/Service.php index ba053ad68..1dc6c47f0 100644 --- a/src/bb-modules/Servicesolusvm/Service.php +++ b/src/bb-modules/Servicesolusvm/Service.php @@ -165,8 +165,8 @@ class Service implements InjectionAwareInterface $meta->rel_id = $cluster_id; $meta->meta_key = 'config'; $meta->meta_value = json_encode($config); - $meta->created_at = date('c'); - $meta->updated_at = date('c'); + $meta->created_at = date('Y-m-d H:i:s'); + $meta->updated_at = date('Y-m-d H:i:s'); $this->di['db']->store($meta); } else { $config = json_decode($config, 1); @@ -187,8 +187,8 @@ class Service implements InjectionAwareInterface $meta->client_id = $client->id; $meta->meta_key = 'solusvm_username'; $meta->meta_value = $username; - $meta->created_at = date('c'); - $meta->updated_at = date('c'); + $meta->created_at = date('Y-m-d H:i:s'); + $meta->updated_at = date('Y-m-d H:i:s'); $this->di['db']->store($meta); $meta = $this->di['db']->dispense('extension_meta'); @@ -196,8 +196,8 @@ class Service implements InjectionAwareInterface $meta->client_id = $client->id; $meta->meta_key = 'solusvm_password'; $meta->meta_value = $password; - $meta->created_at = date('c'); - $meta->updated_at = date('c'); + $meta->created_at = date('Y-m-d H:i:s'); + $meta->updated_at = date('Y-m-d H:i:s'); $this->di['db']->store($meta); } @@ -234,8 +234,8 @@ class Service implements InjectionAwareInterface $model->client_id = $order->client_id; $model->hostname = strtolower($c['hostname']); $model->template = $c['template']; - $model->created_at = date('c'); - $model->updated_at = date('c'); + $model->created_at = date('Y-m-d H:i:s'); + $model->updated_at = date('Y-m-d H:i:s'); $this->di['db']->store($model); return $model; } @@ -324,7 +324,7 @@ class Service implements InjectionAwareInterface $model->issuelicense = $issuelicense; $model->mainipaddress = $result['mainipaddress']; $model->extraipaddress = isset($result['extraipaddress']) ? $result['extraipaddress'] : null ; - $model->updated_at = date('c'); + $model->updated_at = date('Y-m-d H:i:s'); $this->di['db']->store($model); //pass params to event hook @@ -343,7 +343,7 @@ class Service implements InjectionAwareInterface public function suspend($order, $model) { $this->_getApi()->vserver_suspend($model->vserverid); - $model->updated_at = date('c'); + $model->updated_at = date('Y-m-d H:i:s'); $this->di['db']->store($model); return true; } @@ -355,7 +355,7 @@ class Service implements InjectionAwareInterface public function unsuspend($order, $model) { $this->_getApi()->vserver_unsuspend($model->vserverid); - $model->updated_at = date('c'); + $model->updated_at = date('Y-m-d H:i:s'); $this->di['db']->store($model); return true; } diff --git a/src/bb-modules/Serviceyouhosting/Service.php b/src/bb-modules/Serviceyouhosting/Service.php index 5726dc832..7b1b32526 100644 --- a/src/bb-modules/Serviceyouhosting/Service.php +++ b/src/bb-modules/Serviceyouhosting/Service.php @@ -271,11 +271,11 @@ class Service implements \Box\InjectionAwareInterface $meta = $this->di['db']->dispense('extension_meta'); $meta->extension = 'mod_serviceyouhosting'; $meta->meta_key = 'last_account_page'; - $meta->created_at = date('c'); + $meta->created_at = date('Y-m-d H:i:s'); } $meta->meta_value = $page; - $meta->updated_at = date('c'); + $meta->updated_at = date('Y-m-d H:i:s'); $this->di['db']->store($meta); } @@ -307,11 +307,11 @@ class Service implements \Box\InjectionAwareInterface $meta = $this->di['db']->dispense('extension_meta'); $meta->extension = 'mod_serviceyouhosting'; $meta->meta_key = 'last_client_page'; - $meta->created_at = date('c'); + $meta->created_at = date('Y-m-d H:i:s'); } $meta->meta_value = $page; - $meta->updated_at = date('c'); + $meta->updated_at = date('Y-m-d H:i:s'); $this->di['db']->store($meta); } @@ -331,8 +331,8 @@ class Service implements \Box\InjectionAwareInterface $meta->client_id = $client_id; $meta->meta_key = 'yh_client_id'; $meta->meta_value = $yh_client_id; - $meta->created_at = date('c'); - $meta->updated_at = date('c'); + $meta->created_at = date('Y-m-d H:i:s'); + $meta->updated_at = date('Y-m-d H:i:s'); $this->di['db']->store($meta); } diff --git a/src/bb-modules/Staff/Api/Admin.php b/src/bb-modules/Staff/Api/Admin.php index 1fc98c51e..a9fe68b05 100644 --- a/src/bb-modules/Staff/Api/Admin.php +++ b/src/bb-modules/Staff/Api/Admin.php @@ -436,7 +436,7 @@ class Admin extends \Api_Abstract $admin->signature = $data['signature']; } - $admin->updated_at = date('c'); + $admin->updated_at = date('Y-m-d H:i:s'); $this->di['db']->store($admin); $event_params = array(); @@ -462,7 +462,7 @@ class Admin extends \Api_Abstract $this->di['events_manager']->fire(array('event'=>'onBeforeAdminStaffApiKeyChange', 'params'=>$event_params)); $admin->api_token = $this->di['tools']->generatePassword(32); - $admin->updated_at = date('c'); + $admin->updated_at = date('Y-m-d H:i:s'); $this->di['db']->store($admin); $this->di['events_manager']->fire(array('event'=>'onAfterAdminStaffApiKeyChange', 'params'=>$event_params)); @@ -503,7 +503,7 @@ class Admin extends \Api_Abstract $admin = $this->getIdentity(); $admin->pass = $data['password']; - $admin->updated_at = date('c'); + $admin->updated_at = date('Y-m-d H:i:s'); $this->di['db']->store($admin); $event_params = array(); diff --git a/src/bb-modules/Staff/Service.php b/src/bb-modules/Staff/Service.php index 108e83752..93316a5d6 100644 --- a/src/bb-modules/Staff/Service.php +++ b/src/bb-modules/Staff/Service.php @@ -362,8 +362,8 @@ class Service implements InjectionAwareInterface $cron->signature = ""; $cron->protected = 1; $cron->status = 'active'; - $cron->created_at = date('c'); - $cron->updated_at = date('c'); + $cron->created_at = date('Y-m-d H:i:s'); + $cron->updated_at = date('Y-m-d H:i:s'); $this->di['db']->store($cron); return $cron; } @@ -415,7 +415,7 @@ class Service implements InjectionAwareInterface $model->signature = $data['signature']; } - $model->updated_at = date('c'); + $model->updated_at = date('Y-m-d H:i:s'); $this->di['db']->store($model); $this->di['events_manager']->fire(array('event'=>'onAfterAdminStaffUpdate', 'params'=>array('id'=>$model->id))); @@ -446,7 +446,7 @@ class Service implements InjectionAwareInterface $this->di['events_manager']->fire(array('event'=>'onBeforeAdminStaffPasswordChange', 'params'=>array('id'=>$model->id))); $model->pass = $this->di['password']->hashIt($password); - $model->updated_at = date('c'); + $model->updated_at = date('Y-m-d H:i:s'); $this->di['db']->store($model); $this->di['events_manager']->fire(array('event'=>'onAfterAdminStaffPasswordChange', 'params'=>array('id'=>$model->id))); @@ -472,8 +472,8 @@ class Service implements InjectionAwareInterface $model->name = $data['name']; $model->status = $model->getStatus($data['status']); $model->signature = $signature; - $model->created_at = date('c'); - $model->updated_at = date('c'); + $model->created_at = date('Y-m-d H:i:s'); + $model->updated_at = date('Y-m-d H:i:s'); try { $newId = $this->di['db']->store($model); @@ -498,8 +498,8 @@ class Service implements InjectionAwareInterface $admin->pass = $this->di['password']->hashIt($data['password']); $admin->protected = 1; $admin->status = 'active'; - $admin->created_at = date('c'); - $admin->updated_at = date('c'); + $admin->created_at = date('Y-m-d H:i:s'); + $admin->updated_at = date('Y-m-d H:i:s'); $newId = $this->di['db']->store($admin); @@ -540,8 +540,8 @@ class Service implements InjectionAwareInterface $model = $this->di['db']->dispense('AdminGroup'); $model->name = $name; - $model->created_at = date('c'); - $model->updated_at = date('c'); + $model->created_at = date('Y-m-d H:i:s'); + $model->updated_at = date('Y-m-d H:i:s'); $groupId = $this->di['db']->store($model); $this->di['logger']->info('Created new staff group %s', $groupId); @@ -585,7 +585,7 @@ class Service implements InjectionAwareInterface if (isset($data['name'])){ $model->name = $data['name']; } - $model->updated_at = date('c'); + $model->updated_at = date('Y-m-d H:i:s'); $this->di['db']->store($model); $this->di['logger']->info('Updated staff group %s', $model->id); diff --git a/src/bb-modules/Support/Service.php b/src/bb-modules/Support/Service.php index 0972156b9..6ed8fce36 100644 --- a/src/bb-modules/Support/Service.php +++ b/src/bb-modules/Support/Service.php @@ -446,7 +446,7 @@ class Service implements \Box\InjectionAwareInterface public function closeTicket(\Model_SupportTicket $ticket, $identity) { $ticket->status = \Model_SupportTicket::CLOSED; - $ticket->updated_at = date('c'); + $ticket->updated_at = date('Y-m-d H:i:s'); $this->di['db']->store($ticket); @@ -464,7 +464,7 @@ class Service implements \Box\InjectionAwareInterface public function autoClose(\Model_SupportTicket $model) { $model->status = \Model_SupportTicket::CLOSED; - $model->updated_at = date('c'); + $model->updated_at = date('Y-m-d H:i:s'); $this->di['db']->store($model); $this->di['logger']->info('Ticket %s was closed', $model->id); @@ -720,7 +720,7 @@ class Service implements \Box\InjectionAwareInterface $model->priority = $data['priority']; } - $model->updated_at = date('c'); + $model->updated_at = date('Y-m-d H:i:s'); $this->di['db']->store($model); @@ -732,7 +732,7 @@ class Service implements \Box\InjectionAwareInterface public function ticketMessageUpdate(\Model_SupportTicketMessage $model, $content) { $model->content = $content; - $model->updated_at = date('c'); + $model->updated_at = date('Y-m-d H:i:s'); $this->di['db']->store($model); @@ -753,8 +753,8 @@ class Service implements \Box\InjectionAwareInterface } $msg->content = $content; $msg->ip = $this->di['request']->getClientAddress(); - $msg->created_at = date('c'); - $msg->updated_at = date('c'); + $msg->created_at = date('Y-m-d H:i:s'); + $msg->updated_at = date('Y-m-d H:i:s'); $msgId = $this->di['db']->store($msg); if ($identity instanceof \Model_Admin) { @@ -763,7 +763,7 @@ class Service implements \Box\InjectionAwareInterface $ticket->status = \Model_SupportTicket::OPENED; } - $ticket->updated_at = date('c'); + $ticket->updated_at = date('Y-m-d H:i:s'); $this->di['db']->store($ticket); if ($identity instanceof \Model_Admin) { @@ -788,8 +788,8 @@ class Service implements \Box\InjectionAwareInterface $ticket->status = $status; $ticket->subject = $data['subject']; $ticket->support_helpdesk_id = $helpdesk->id; - $ticket->created_at = date('c'); - $ticket->updated_at = date('c'); + $ticket->created_at = date('Y-m-d H:i:s'); + $ticket->updated_at = date('Y-m-d H:i:s'); $ticketId = $this->di['db']->store($ticket); $msg = $this->di['db']->dispense('SupportTicketMessage'); @@ -797,8 +797,8 @@ class Service implements \Box\InjectionAwareInterface $msg->support_ticket_id = $ticketId; $msg->content = $data['content']; $msg->ip = $this->di['request']->getClientAddress(); - $msg->created_at = date('c'); - $msg->updated_at = date('c'); + $msg->created_at = date('Y-m-d H:i:s'); + $msg->updated_at = date('Y-m-d H:i:s'); $this->di['db']->store($msg); @@ -827,16 +827,16 @@ class Service implements \Box\InjectionAwareInterface $ticket->author_email = $data['email']; $ticket->subject = $subject; $ticket->status = $status; - $ticket->created_at = date('c'); - $ticket->updated_at = date('c'); + $ticket->created_at = date('Y-m-d H:i:s'); + $ticket->updated_at = date('Y-m-d H:i:s'); $ticketId = $this->di['db']->store($ticket); $msg = $this->di['db']->dispense('SupportPTicketMessage'); $msg->support_p_ticket_id = $ticket->id; $msg->content = $message; $msg->ip = $this->di['request']->getClientAddress(); - $msg->created_at = date('c'); - $msg->updated_at = date('c'); + $msg->created_at = date('Y-m-d H:i:s'); + $msg->updated_at = date('Y-m-d H:i:s'); $this->di['db']->store($msg); $this->di['events_manager']->fire(array('event' => 'onAfterGuestPublicTicketOpen', 'params' => array('id' => $ticketId))); @@ -855,7 +855,7 @@ class Service implements \Box\InjectionAwareInterface return true; } - $timeSinceLast = round(abs(strtotime($lastTicket->created_at) - strtotime(date('c'))) / 3600, 0); + $timeSinceLast = round(abs(strtotime($lastTicket->created_at) - strtotime(date('Y-m-d H:i:s'))) / 3600, 0); if ($timeSinceLast < $hours) { throw new \Box_Exception(sprintf('You can submit one ticket per %s hours. %s hours left', $hours, $hours - $timeSinceLast)); @@ -894,8 +894,8 @@ class Service implements \Box\InjectionAwareInterface $ticket->client_id = $client->id; $ticket->subject = $data['subject']; $ticket->support_helpdesk_id = $helpdesk->id; - $ticket->created_at = date('c'); - $ticket->updated_at = date('c'); + $ticket->created_at = date('Y-m-d H:i:s'); + $ticket->updated_at = date('Y-m-d H:i:s'); // related task with ticket $ticket->rel_id = $rel_id; @@ -955,8 +955,8 @@ class Service implements \Box\InjectionAwareInterface } $msg->content = $content; $msg->ip = $this->di['request']->getClientAddress(); - $msg->created_at = date('c'); - $msg->updated_at = date('c'); + $msg->created_at = date('Y-m-d H:i:s'); + $msg->updated_at = date('Y-m-d H:i:s'); return $this->di['db']->store($msg); } @@ -1101,7 +1101,7 @@ class Service implements \Box\InjectionAwareInterface public function publicCloseTicket(\Model_SupportPTicket $model, $identity) { $model->status = 'closed'; - $model->updated_at = date('c'); + $model->updated_at = date('Y-m-d H:i:s'); $this->di['db']->store($model); @@ -1120,7 +1120,7 @@ class Service implements \Box\InjectionAwareInterface public function publicAutoClose(\Model_SupportPTicket $model) { $model->status = 'closed'; - $model->updated_at = date('c'); + $model->updated_at = date('Y-m-d H:i:s'); $this->di['db']->store($model); @@ -1207,8 +1207,8 @@ class Service implements \Box\InjectionAwareInterface $ticket->author_email = $data['email']; $ticket->subject = $data['subject']; $ticket->status = 'open'; - $ticket->created_at = date('c'); - $ticket->updated_at = date('c'); + $ticket->created_at = date('Y-m-d H:i:s'); + $ticket->updated_at = date('Y-m-d H:i:s'); $ticketId = $this->di['db']->store($ticket); $msg = $this->di['db']->dispense('SupportPTicketMessage'); @@ -1216,8 +1216,8 @@ class Service implements \Box\InjectionAwareInterface $msg->admin_id = $identity->id; $msg->content = $data['message']; $msg->ip = $this->di['request']->getClientAddress(); - $msg->created_at = date('c'); - $msg->updated_at = date('c'); + $msg->created_at = date('Y-m-d H:i:s'); + $msg->updated_at = date('Y-m-d H:i:s'); $this->di['db']->store($msg); $this->di['events_manager']->fire(array('event' => 'onAfterAdminPublicTicketOpen', 'params' => array('id' => $ticketId))); @@ -1237,7 +1237,7 @@ class Service implements \Box\InjectionAwareInterface $model->status = $data['status']; } - $model->updated_at = date('c'); + $model->updated_at = date('Y-m-d H:i:s'); $this->di['db']->store($model); $this->di['logger']->info('Updated public ticket #%s', $model->id); @@ -1252,12 +1252,12 @@ class Service implements \Box\InjectionAwareInterface $msg->admin_id = $identity->id; $msg->content = $content; $msg->ip = $this->di['request']->getClientAddress(); - $msg->created_at = date('c'); - $msg->updated_at = date('c'); + $msg->created_at = date('Y-m-d H:i:s'); + $msg->updated_at = date('Y-m-d H:i:s'); $messageId = $this->di['db']->store($msg); $ticket->status = \Model_SupportPTicket::ONHOLD; - $ticket->updated_at = date('c'); + $ticket->updated_at = date('Y-m-d H:i:s'); $this->di['db']->store($ticket); $this->di['events_manager']->fire(array('event' => 'onAfterAdminPublicTicketReply', 'params' => array('id' => $ticket->id))); @@ -1273,12 +1273,12 @@ class Service implements \Box\InjectionAwareInterface $msg->support_p_ticket_id = $ticket->id; $msg->content = $message; $msg->ip = $this->di['request']->getClientAddress(); - $msg->created_at = date('c'); - $msg->updated_at = date('c'); + $msg->created_at = date('Y-m-d H:i:s'); + $msg->updated_at = date('Y-m-d H:i:s'); $this->di['db']->store($msg); $ticket->status = \Model_SupportPTicket::OPENED; - $ticket->updated_at = date('c'); + $ticket->updated_at = date('Y-m-d H:i:s'); $this->di['db']->store($ticket); $this->di['events_manager']->fire(array('event' => 'onAfterGuestPublicTicketReply', 'params' => array('id' => $ticket->id))); @@ -1310,7 +1310,7 @@ class Service implements \Box\InjectionAwareInterface $model->signature = $data['signature']; } - $model->updated_at = date('c'); + $model->updated_at = date('Y-m-d H:i:s'); $id = $this->di['db']->store($model); $this->di['logger']->info('Updated helpdesk #%s', $id); @@ -1326,8 +1326,8 @@ class Service implements \Box\InjectionAwareInterface $model->can_reopen = isset($data['can_reopen']) ? $data['can_reopen'] : NULL; $model->close_after = isset($data['close_after']) ? $data['close_after'] : NULL; $model->signature = isset($data['signature']) ? $data['signature'] : NULL; - $model->created_at = date('c'); - $model->updated_at = date('c'); + $model->created_at = date('Y-m-d H:i:s'); + $model->updated_at = date('Y-m-d H:i:s'); $id = $this->di['db']->store($model); $this->di['logger']->info('Created helpdesk #%s', $id); @@ -1432,8 +1432,8 @@ class Service implements \Box\InjectionAwareInterface $model->support_pr_category_id = $categoryId; $model->title = $title; $model->content = $content; - $model->created_at = date('c'); - $model->updated_at = date('c'); + $model->created_at = date('Y-m-d H:i:s'); + $model->updated_at = date('Y-m-d H:i:s'); $id = $this->di['db']->store($model); $this->di['logger']->info('Created new canned response #%s', $id); @@ -1455,7 +1455,7 @@ class Service implements \Box\InjectionAwareInterface $model->content = $data['content']; } - $model->updated_at = date('c'); + $model->updated_at = date('Y-m-d H:i:s'); $this->di['db']->store($model); $this->di['logger']->info('Updated canned response #%s', $model->id); @@ -1467,8 +1467,8 @@ class Service implements \Box\InjectionAwareInterface { $model = $this->di['db']->dispense('SupportPrCategory'); $model->title = $title; - $model->created_at = date('c'); - $model->updated_at = date('c'); + $model->created_at = date('Y-m-d H:i:s'); + $model->updated_at = date('Y-m-d H:i:s'); $id = $this->di['db']->store($model); $this->di['logger']->info('Created new canned response category #%s', $id); @@ -1479,7 +1479,7 @@ class Service implements \Box\InjectionAwareInterface public function cannedCategoryUpdate(\Model_SupportPrCategory $model, $title) { $model->title = $title; - $model->updated_at = date('c'); + $model->updated_at = date('Y-m-d H:i:s'); $id = $this->di['db']->store($model); $this->di['logger']->info('Updated canned response category #%s', $id); @@ -1493,8 +1493,8 @@ class Service implements \Box\InjectionAwareInterface $model->support_ticket_id = $ticket->id; $model->admin_id = $identity->id; $model->note = $note; - $model->created_at = date('c'); - $model->updated_at = date('c'); + $model->created_at = date('Y-m-d H:i:s'); + $model->updated_at = date('Y-m-d H:i:s'); $id = $this->di['db']->store($model); $this->di['logger']->info('Added note to ticket #%s', $id); @@ -1505,7 +1505,7 @@ class Service implements \Box\InjectionAwareInterface public function ticketTaskComplete(\Model_SupportTicket $model) { $model->rel_status = \Model_SupportTicket::REL_STATUS_COMPLETE; - $model->updated_at = date('c'); + $model->updated_at = date('Y-m-d H:i:s'); $id = $this->di['db']->store($model); $this->di['logger']->info('Marked ticket #%s task as complete', $id); diff --git a/src/bb-modules/System/Service.php b/src/bb-modules/System/Service.php index ccf31e62f..2c69d76d7 100644 --- a/src/bb-modules/System/Service.php +++ b/src/bb-modules/System/Service.php @@ -61,7 +61,7 @@ class Service try { $query="INSERT INTO setting (param, value, created_at, updated_at) VALUES (:param, :value, :created_at, :updated_at)"; $stmt = $pdo->prepare($query); - $stmt->execute(array('param'=>$param, 'value'=>$value, 'created_at'=>date('c'), 'updated_at'=>date('c'))); + $stmt->execute(array('param'=>$param, 'value'=>$value, 'created_at'=>date('Y-m-d H:i:s'), 'updated_at'=>date('Y-m-d H:i:s'))); } catch(\Exception $e) { //ignore duplicate key error if($e->getCode() != 23000) { @@ -195,7 +195,7 @@ class Service $expires_at = null; if(isset($details['expires_at']) && $details['expires_at']) { if(is_numeric($details['expires_at'])) { - $expires_at = date('c', $details['expires_at']); + $expires_at = date('Y-m-d H:i:s', $details['expires_at']); } else { $expires_at = $details['expires_at']; } diff --git a/src/bb-modules/Theme/Service.php b/src/bb-modules/Theme/Service.php index 622290bd8..5bf0361e3 100644 --- a/src/bb-modules/Theme/Service.php +++ b/src/bb-modules/Theme/Service.php @@ -188,11 +188,11 @@ class Service implements InjectionAwareInterface $meta->rel_type = 'settings'; $meta->rel_id = $theme->getName(); $meta->meta_key = $preset; - $meta->created_at = date('c'); + $meta->created_at = date('Y-m-d H:i:s'); } $meta->meta_value = json_encode($params); - $meta->updated_at = date('c'); + $meta->updated_at = date('Y-m-d H:i:s'); $this->di['db']->store($meta); return true; diff --git a/src/bb-update.php b/src/bb-update.php index 15e389a62..3c7db5944 100644 --- a/src/bb-update.php +++ b/src/bb-update.php @@ -719,11 +719,11 @@ abstract class BBPatchAbstract if(is_null($this->getParamValue($param))) { $query="INSERT INTO setting (param, value, public, updated_at, created_at) VALUES (:param, :value, 1, :u, :c)"; $stmt = $this->pdo->prepare($query); - $stmt->execute(array('param'=>$param, 'value'=>$value, 'c'=>date('c'), 'u'=>date('c'))); + $stmt->execute(array('param'=>$param, 'value'=>$value, 'c'=>date('Y-m-d H:i:s'), 'u'=>date('Y-m-d H:i:s'))); } else { $query="UPDATE setting SET value = :value, updated_at = :u WHERE param = :param"; $stmt = $this->pdo->prepare($query); - $stmt->execute(array('param'=>$param, 'value'=>$value, 'u'=>date('c'))); + $stmt->execute(array('param'=>$param, 'value'=>$value, 'u'=>date('Y-m-d H:i:s'))); } } diff --git a/tests/bb-library/Box/LogTest.php b/tests/bb-library/Box/LogTest.php index 6394cbbf5..c68ba5870 100644 --- a/tests/bb-library/Box/LogTest.php +++ b/tests/bb-library/Box/LogTest.php @@ -23,7 +23,7 @@ class Box_LogTest extends PHPUnit_Framework_TestCase $log->err('Test', array('admin_id'=>1, 'client_id'=>2)); $log->err('Test 2', array('admin_id'=>3, 'client_id'=>4)); - $date = date('c'); + $date = date('Y-m-d H:i:s'); $outputString = $date." ERR (3): Test".PHP_EOL; $outputString .= $date." ERR (3): Test 2".PHP_EOL; $this->expectOutputString($outputString); diff --git a/tests/bb-modules/Cart/Api/AdminTest.php b/tests/bb-modules/Cart/Api/AdminTest.php index c11c683f0..ed1ec3039 100644 --- a/tests/bb-modules/Cart/Api/AdminTest.php +++ b/tests/bb-modules/Cart/Api/AdminTest.php @@ -93,7 +93,7 @@ class AdminTest extends \PHPUnit_Framework_TestCase $dbMock = $this->getMockBuilder('\Box_Database')->disableOriginalConstructor()->getMock(); $dbMock->expects($this->atLeastOnce()) ->method('getAssoc') - ->will($this->returnValue(array(rand(1, 100), date('c')))); + ->will($this->returnValue(array(rand(1, 100), date('Y-m-d H:i:s')))); $dbMock->expects($this->atLeastOnce()) ->method('exec') ->will($this->returnValue(null)); diff --git a/tests/bb-modules/Email/Api/Api_AdminTest.php b/tests/bb-modules/Email/Api/Api_AdminTest.php index 2a3feed32..cacb3a821 100644 --- a/tests/bb-modules/Email/Api/Api_AdminTest.php +++ b/tests/bb-modules/Email/Api/Api_AdminTest.php @@ -51,8 +51,8 @@ class AdminTest extends \PHPUnit_Framework_TestCase $subject = 'Subject'; $content_html = 'HTML'; $content_text = 'TEXT'; - $created = date('c', time() - 86400); - $updated = date('c'); + $created = date('Y-m-d H:i:s', time() - 86400); + $updated = date('Y-m-d H:i:s'); $model = new \Model_ActivityClientEmail(); $model->loadBean(new \RedBeanPHP\OODBBean()); diff --git a/tests/bb-modules/Email/ServiceTest.php b/tests/bb-modules/Email/ServiceTest.php index a7297eea0..ad0e34258 100644 --- a/tests/bb-modules/Email/ServiceTest.php +++ b/tests/bb-modules/Email/ServiceTest.php @@ -174,8 +174,8 @@ class ServiceTest extends \PHPUnit_Framework_TestCase $subject = 'Subject'; $content_html = 'HTML'; $content_text = 'TEXT'; - $created = date('c', time() - 86400); - $updated = date('c'); + $created = date('Y-m-d H:i:s', time() - 86400); + $updated = date('Y-m-d H:i:s'); $model = new \Model_ActivityClientEmail(); $model->loadBean(new \RedBeanPHP\OODBBean()); diff --git a/tests/bb-modules/Servicecustom/ServiceTest.php b/tests/bb-modules/Servicecustom/ServiceTest.php index a50072b1e..fffb3f876 100644 --- a/tests/bb-modules/Servicecustom/ServiceTest.php +++ b/tests/bb-modules/Servicecustom/ServiceTest.php @@ -518,8 +518,8 @@ class ServiceTest extends \PHPUnit_Framework_TestCase $model->client_id = rand(1, 100); $model->plugin = 'plugin'; $model->config = 'config_json'; - $model->updated_at = date('c'); - $model->created_at = date('c'); + $model->updated_at = date('Y-m-d H:i:s'); + $model->created_at = date('Y-m-d H:i:s'); $result = $this->service->toApiArray($model); diff --git a/tests/bb-modules/Servicedomain/ServiceTest.php b/tests/bb-modules/Servicedomain/ServiceTest.php index 0b9d978e2..6ed8b4e43 100644 --- a/tests/bb-modules/Servicedomain/ServiceTest.php +++ b/tests/bb-modules/Servicedomain/ServiceTest.php @@ -1604,8 +1604,8 @@ class ServiceTest extends \PHPUnit_Framework_TestCase $model->period = 'period'; $model->privacy = 'privacy'; $model->locked = 'locked'; - $model->registered_at = date('c'); - $model->expires_at = date('c'); + $model->registered_at = date('Y-m-d H:i:s'); + $model->expires_at = date('Y-m-d H:i:s'); $model->contact_first_name = 'first_name'; $model->contact_last_name = 'last_name'; @@ -1760,7 +1760,7 @@ class ServiceTest extends \PHPUnit_Framework_TestCase $systemServiceMock = $this->getMockBuilder('\Box\Mod\System\Service') ->setMethods(array('getParamValue', 'setParamValue'))->getMock(); $systemServiceMock->expects($this->atLeastOnce())->method('getParamValue') - ->will($this->returnValue(date('c'))); + ->will($this->returnValue(date('Y-m-d H:i:s'))); $systemServiceMock->expects($this->never())->method('setParamValue') ->will($this->returnValue(null)); @@ -2279,8 +2279,8 @@ class ServiceTest extends \PHPUnit_Framework_TestCase $data['min_years'] = rand(1, 5); $data['allow_register'] = 1; $data['allow_transfer'] = 1; - $data['updated_at'] = date('c'); - $data['created_at'] = date('c'); + $data['updated_at'] = date('Y-m-d H:i:s'); + $data['created_at'] = date('Y-m-d H:i:s'); $randId = rand(1, 100); @@ -2319,8 +2319,8 @@ class ServiceTest extends \PHPUnit_Framework_TestCase $data['allow_register'] = true; $data['allow_transfer'] = true; $data['active'] = true; - $data['updated_at'] = date('c'); - $data['created_at'] = date('c'); + $data['updated_at'] = date('Y-m-d H:i:s'); + $data['created_at'] = date('Y-m-d H:i:s'); $randId = rand(1, 100); diff --git a/tests/bb-modules/Support/ServiceTest.php b/tests/bb-modules/Support/ServiceTest.php index 25e8abe75..16c025b0e 100644 --- a/tests/bb-modules/Support/ServiceTest.php +++ b/tests/bb-modules/Support/ServiceTest.php @@ -457,9 +457,9 @@ class ServiceTest extends \PHPUnit_Framework_TestCase 'subject' => 'subject', 'content' => 'Content', 'support_helpdesk_id' => rand(1, 100), - 'created_at' => date('c'), - 'date_from' => date('c'), - 'date_to' => date('c'), + 'created_at' => date('Y-m-d H:i:s'), + 'date_from' => date('Y-m-d H:i:s'), + 'date_to' => date('Y-m-d H:i:s'), 'priority' => rand(1, 100), ) ), @@ -474,9 +474,9 @@ class ServiceTest extends \PHPUnit_Framework_TestCase 'subject' => 'subject', 'content' => 'Content', 'support_helpdesk_id' => rand(1, 100), - 'created_at' => date('c'), - 'date_from' => date('c'), - 'date_to' => date('c'), + 'created_at' => date('Y-m-d H:i:s'), + 'date_from' => date('Y-m-d H:i:s'), + 'date_to' => date('Y-m-d H:i:s'), 'priority' => rand(1, 100), ) ) @@ -2549,12 +2549,12 @@ class ServiceTest extends \PHPUnit_Framework_TestCase $ticket = new \Model_SupportTicket(); $ticket->loadBean(new \RedBeanPHP\OODBBean()); $ticket->client_id = 5; - $ticket->created_at = date('c'); + $ticket->created_at = date('Y-m-d H:i:s'); $ticket2 = new \Model_SupportTicket(); $ticket2->loadBean(new \RedBeanPHP\OODBBean()); $ticket2->client_id = 5; - $ticket2->created_at = date('c', strtotime("-2 days"));; + $ticket2->created_at = date('Y-m-d H:i:s', strtotime("-2 days"));; return array( array($ticket, 24, false), //Ticket is created today, exception should be thrown diff --git a/tests/integration/bb-modules/mod_invoice/Api_AdminTest.php b/tests/integration/bb-modules/mod_invoice/Api_AdminTest.php index 28ba077e9..98314f583 100644 --- a/tests/integration/bb-modules/mod_invoice/Api_AdminTest.php +++ b/tests/integration/bb-modules/mod_invoice/Api_AdminTest.php @@ -257,7 +257,7 @@ class Api_Admin_InvoiceTest extends BBDbApiTestCase 'notes' => 'note', 'serie' => 'NEW', 'nr' => 4, - 'due_at' => date('c'), + 'due_at' => date('Y-m-d H:i:s'), ); $bool = $this->api_admin->invoice_update($data); $this->assertTrue($bool); diff --git a/tests/integration/bb-modules/mod_invoice/Api_Client2Test.php b/tests/integration/bb-modules/mod_invoice/Api_Client2Test.php index 4a8df11ec..a1174ceab 100644 --- a/tests/integration/bb-modules/mod_invoice/Api_Client2Test.php +++ b/tests/integration/bb-modules/mod_invoice/Api_Client2Test.php @@ -11,7 +11,7 @@ class Api_Client_InvoiceTest extends BBDbApiTestCase //prepare expiring order $data = array( 'id' => 5, - 'expires_at' => date('c', strtotime('+1 day')), + 'expires_at' => date('Y-m-d H:i:s', strtotime('+1 day')), ); $bool = $this->api_admin->order_update($data); $this->assertTrue($bool); diff --git a/tests/integration/bb-modules/mod_order/Api_AdminTest.php b/tests/integration/bb-modules/mod_order/Api_AdminTest.php index 8ad4487bb..0a9afed8b 100644 --- a/tests/integration/bb-modules/mod_order/Api_AdminTest.php +++ b/tests/integration/bb-modules/mod_order/Api_AdminTest.php @@ -60,7 +60,7 @@ class Api_Admin_OrderTest extends BBDbApiTestCase $list = $this->api_admin->order_get_list(array()); $this->assertInternalType('array', $list); - $bool = $this->api_admin->order_update(array('id'=>1,'expires_at'=>date('c', strtotime('+ 2 days')))); + $bool = $this->api_admin->order_update(array('id'=>1,'expires_at'=>date('Y-m-d H:i:s', strtotime('+ 2 days')))); $this->assertTrue($bool); $bool = $this->api_admin->order_renew($data); @@ -164,7 +164,7 @@ class Api_Admin_OrderTest extends BBDbApiTestCase $data = array( 'id' => 8, 'period' => '2Y', - 'expires_at' => date('c', strtotime('2012-01-10')), + 'expires_at' => date('Y-m-d H:i:s', strtotime('2012-01-10')), ); $this->api_admin->order_update($data); $ob = $this->api_admin->order_get($data); diff --git a/tests/integration/bb-modules/mod_support/Api_AdminTest.php b/tests/integration/bb-modules/mod_support/Api_AdminTest.php index 78aa02212..2f70271f7 100644 --- a/tests/integration/bb-modules/mod_support/Api_AdminTest.php +++ b/tests/integration/bb-modules/mod_support/Api_AdminTest.php @@ -206,7 +206,7 @@ class Api_Admin_SupportTest extends BBDbApiTestCase $model = $this->di['db']->load('SupportPTicket',$ticket['id']); $model->status = 'on_hold'; - $model->updated_at = date('c', strtotime('-50 days')); + $model->updated_at = date('Y-m-d H:i:s', strtotime('-50 days')); $this->di['db']->store($model); $bool = $this->api_admin->support_batch_public_ticket_auto_close();