PM-444 "0013316: Be able to assign users to different time zone (user's time zone)" SOLVED

Issue:
    PM-444:  0013316: Be able to assign users to different time zone
    PM-3493: Agregar soporte multiple timezone a los endpoints usando formato fecha ISO 8601
Cause:
    New feature
Solution:
    Added functionality for time zone
This commit is contained in:
Victor Saisa Lopez
2015-11-26 20:11:58 -04:00
parent 4879d8089e
commit 6cd975664b
36 changed files with 931 additions and 276 deletions

View File

@@ -11,6 +11,11 @@ use \Luracast\Restler\RestException;
*/
class User extends Api
{
private $arrayFieldIso8601 = [
'usr_create_date',
'usr_update_date'
];
/**
* Constructor of the class
*
@@ -47,7 +52,7 @@ class User extends Api
$response = $user->getUsers($arrayFilterData, null, null, $start, $limit);
return $response["data"];
return \ProcessMaker\Util\DateTime::convertUtcToIso8601($response['data'], $this->arrayFieldIso8601);
} catch (\Exception $e) {
throw new RestException(Api::STAT_APP_EXCEPTION, $e->getMessage());
}
@@ -65,7 +70,8 @@ class User extends Api
$user->setFormatFieldNameInUppercase(false);
$response = $user->getUser($usr_uid);
return $response;
return \ProcessMaker\Util\DateTime::convertUtcToIso8601($response, $this->arrayFieldIso8601);
} catch (\Exception $e) {
throw (new RestException(Api::STAT_APP_EXCEPTION, $e->getMessage()));
}