From 21d5f8e5dc01492ac2df2e28198312b3b299a323 Mon Sep 17 00:00:00 2001 From: Rishabh Jain Date: Thu, 10 Oct 2024 13:59:44 +0530 Subject: [PATCH] fix - updated startBatchUpload method in http_client.dart file to send "sentAt" as UTC format. --- packages/core/lib/utils/http_client.dart | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/core/lib/utils/http_client.dart b/packages/core/lib/utils/http_client.dart index 73dd283..9fd9330 100644 --- a/packages/core/lib/utils/http_client.dart +++ b/packages/core/lib/utils/http_client.dart @@ -38,7 +38,7 @@ class HTTPClient { var urlRequest = _configuredRequest(uploadURL, "POST", body: jsonEncode({ "batch": batch.map((e) => e.toJson()).toList(), - "sentAt": DateTime.now().toIso8601String(), + "sentAt": DateTime.now().toUtc().toIso8601String(), "writeKey": _analytics.target!.state.configuration.state.writeKey, })); var f = urlRequest.send().then(http.Response.fromStream);