Skip to content
GitLab
Menu
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
Extensions
OSDI
Commits
9c42a5c8
Commit
9c42a5c8
authored
Aug 22, 2018
by
Jon
Committed by
everykittysdaydream
Aug 22, 2018
Browse files
Remote Time zone fix (#7)
parent
61c99521
Changes
2
Hide whitespace changes
Inline
Side-by-side
api/v3/Importer/Set
T
ime.php
→
api/v3/Importer/Set
t
ime.php
View file @
9c42a5c8
...
...
@@ -15,7 +15,7 @@
*
* @see http://wiki.civicrm.org/confluence/display/CRMDOC/API+Architecture+Standards
*/
function
_civicrm_api3_importer_Set
T
ime_spec
(
&
$spec
)
{
function
_civicrm_api3_importer_Set
t
ime_spec
(
&
$spec
)
{
$spec
[
'zone'
][
'api.required'
]
=
1
;
}
...
...
@@ -31,7 +31,7 @@ function _civicrm_api3_importer_SetTime_spec(&$spec) {
*
* @throws API_Exception
*/
function
civicrm_api3_importer_Set
T
ime
(
$params
)
{
function
civicrm_api3_importer_Set
t
ime
(
$params
)
{
Civi
::
settings
()
->
set
(
'server_time_zone'
,
$params
[
"zone"
]);
$returnValues
[
"result_zone"
]
=
Civi
::
settings
()
->
get
(
"server_time_zone"
);
...
...
templates/CRM/Osdi/Page/Configure.tpl
View file @
9c42a5c8
...
...
@@ -400,14 +400,14 @@
CRM
.
$
(
"
#TimeForm
"
).
submit
(
function
(
e
)
{
var
data
=
new
Object
();
var
formResults
=
CRM
.
$
(
"
#
OSDIRequest
Form
"
).
serializeArray
().
map
(
function
(
x
){
var
formResults
=
CRM
.
$
(
"
#
Time
Form
"
).
serializeArray
().
map
(
function
(
x
){
data
[
x
.
name
]
=
x
.
value
;}
);
console
.
log
(
"
calling api
"
);
console
.
log
(
JSON
.
stringify
(
data
));
CRM
.
api3
(
'
Importer
'
,
'
SetTime
'
,
{
"
server_time_
zone
"
:
data
[
"
zone
"
]}).
done
(
function
(
result
)
{
"
zone
"
:
data
[
"
zone
"
]}).
done
(
function
(
result
)
{
console
.
log
(
result
);
alert
(
''
.
concat
(
"
Zone:
"
,
result
[
"
values
"
][
"
result_zone
"
],
"
set successfully.
"
));
});
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment