Summit entity event serialization issue
Fixed creation date convertion for america/chicago to UTC Change-Id: I2dce830f17fc1b55b4712acc105efb56c5250a80
This commit is contained in:
parent
89a2f39b9d
commit
206be09adb
|
@ -306,14 +306,13 @@ final class OAuth2SummitApiController extends OAuth2ProtectedController
|
|||
$from_date = Request::input('from_date', null);
|
||||
$limit = Request::input('limit', 25);
|
||||
|
||||
$rules = array
|
||||
(
|
||||
$rules = [
|
||||
'last_event_id' => 'sometimes|required|integer',
|
||||
'from_date' => 'sometimes|required|integer',
|
||||
'limit' => 'sometimes|required|integer',
|
||||
);
|
||||
];
|
||||
|
||||
$data = array();
|
||||
$data = [];
|
||||
|
||||
if (!is_null($last_event_id))
|
||||
{
|
||||
|
@ -344,7 +343,7 @@ final class OAuth2SummitApiController extends OAuth2ProtectedController
|
|||
|
||||
if (!is_null($from_date))
|
||||
{
|
||||
$from_date = new \DateTime("@$from_date");
|
||||
$from_date = new \DateTime("@$from_date", new \DateTimeZone("UTC"));
|
||||
}
|
||||
|
||||
list($last_event_id, $last_event_date, $list) = $this->summit_service->getSummitEntityEvents
|
||||
|
|
|
@ -21,7 +21,7 @@ final class SummitEntityEventSerializer extends SilverStripeSerializer
|
|||
(
|
||||
'EntityId' => 'entity_id:json_int',
|
||||
'EntityClassName' => 'class_name:json_string',
|
||||
'Created' => 'created:datetime_epoch',
|
||||
'CreatedUTC' => 'created:datetime_epoch',
|
||||
'Type' => 'type',
|
||||
);
|
||||
|
||||
|
|
Loading…
Reference in New Issue