@sedni/cloud_common 1.0.7 → 1.0.8

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -240,10 +240,16 @@ channeldataBucketSchema.statics.getNotUploadedData = async function(options)
240
240
  */
241
241
  channeldataBucketSchema.statics.getData = async function(start_date, end_date, plain = false)
242
242
  {
243
+ // Truncate the timestamp to the nearest hour
244
+ const date = new Date(start_date);
245
+ date.setMinutes(0);
246
+ date.setSeconds(0);
247
+ date.setMilliseconds(0);
248
+
243
249
  // Get the data in the specified date range
244
250
  const data = await this.find({
245
251
  start_date: {
246
- $gte: new Date(start_date),
252
+ $gte: date,
247
253
  $lt: new Date(end_date)
248
254
  }
249
255
  });
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@sedni/cloud_common",
3
- "version": "1.0.7",
3
+ "version": "1.0.8",
4
4
  "description": "Common package for all types, resources and tools of Diamar Cloud",
5
5
  "main": "index.js",
6
6
  "scripts": {