diff --git a/CHANGELOG.md b/CHANGELOG.md index d62c898..5b76dcc 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,6 @@ +## 24.10.2 +- Added timezone support for server + ## 24.10.1 - Added a new method `set_id(newDeviceId)` for managing device ID changes according to the device ID Type - Added `DeviceIdType` enums to be used to evaluate the device ID type. diff --git a/lib/countly-bulk.js b/lib/countly-bulk.js index 2670127..40bc9c0 100644 --- a/lib/countly-bulk.js +++ b/lib/countly-bulk.js @@ -59,7 +59,7 @@ CountlyBulk.StorageTypes = cc.storageTypeEnums; * }); */ function CountlyBulk(conf) { - var SDK_VERSION = "24.10.1"; + var SDK_VERSION = "24.10.2"; var SDK_NAME = "javascript_native_nodejs_bulk"; var empty_queue_callback = null; @@ -147,6 +147,7 @@ function CountlyBulk(conf) { var date = new Date((`${query.timestamp}`).length === 13 ? query.timestamp : parseInt(query.timestamp) * 1000); query.hour = query.hour || date.getHours(); query.dow = query.dow || date.getDay(); + query.tz = query.tz || -date.getTimezoneOffset(); requestQueue.push(query); cc.log(cc.logLevelEnums.INFO, "CountlyBulk add_request, Adding request to the queue."); @@ -195,6 +196,7 @@ function CountlyBulk(conf) { var date = new Date((`${query.timestamp}`).length === 13 ? query.timestamp : parseInt(query.timestamp) * 1000); query.hour = query.hour || date.getHours(); query.dow = query.dow || date.getDay(); + query.tz = query.tz || -date.getTimezoneOffset(); cc.log(cc.logLevelEnums.INFO, "CountlyBulk add_bulk_request, adding the request into queue."); requestQueue.push(query); } diff --git a/lib/countly.js b/lib/countly.js index 50d7ad6..c3af111 100644 --- a/lib/countly.js +++ b/lib/countly.js @@ -33,7 +33,7 @@ Countly.StorageTypes = cc.storageTypeEnums; Countly.DeviceIdType = cc.deviceIdTypeEnums; Countly.Bulk = Bulk; (function() { - var SDK_VERSION = "24.10.1"; + var SDK_VERSION = "24.10.2"; var SDK_NAME = "javascript_native_nodejs"; var inited = false; @@ -1437,6 +1437,7 @@ Countly.Bulk = Bulk; var date = new Date(); request.hour = date.getHours(); request.dow = date.getDay(); + request.tz = -date.getTimezoneOffset(); } /** diff --git a/package.json b/package.json index 4b2b870..4848072 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "countly-sdk-nodejs", - "version": "24.10.1", + "version": "24.10.2", "description": "Countly NodeJS SDK", "main": "lib/countly.js", "directories": {