Send setTime argument using epoch time
[profile/ivi/SettingsApp.git] / js / api-datetime.js
1 /*
2  * Copyright (c) 2013, Intel Corporation.
3  *
4  * This program is licensed under the terms and conditions of the
5  * Apache License, version 2.0.  The full text of the Apache License is at
6  * http://www.apache.org/licenses/LICENSE-2.0
7  *
8  */
9
10 /* Namespace */
11 var settings = settings || {};
12 settings.datetime = settings.datetime || {};
13
14 /* Module */
15 settings.datetime = (function() {
16
17     function setTime(new_time, success_cb, error_cb) {
18         wsAPI.sendRequest(WS_REQUEST_TYPE.DATETIME, 'setTime', new_time, success_cb, error_cb);
19     }
20
21     function setTimezone(new_timezone, success_cb, error_cb) {
22         wsAPI.sendRequest(WS_REQUEST_TYPE.DATETIME, 'setTimezone', new_timezone, success_cb, error_cb);
23     }
24
25     return {
26         setTime: setTime,
27         setTimezone: setTimezone
28     };
29 })();