Umstellung auf UTC Timestamp

This commit is contained in:
Sven committed 2025-09-04 09:21:19 +02:00
1 parent fcb3ecdbb4
commit d5ec222efd
41 files changed
+145 -665

No files matched your search

+2 -2
View File
@@ -595,7 +595,7 @@ class MqttCore with ProducerMixin, ConsumerMixin {
answer.utcUnixTime = DateTime.now().toUtc().millisecondsSinceEpoch ~/ 1000;
answer.pos = SyncMessagePos();
answer.pos!.time = DateTime.now().toUtc().toIso8601String();
answer.pos!.time = currentPosition != null ? Util.toUnixMillisUtc(currentPosition.timestamp.toUtc()) : 0;
answer.pos!.lat = currentPosition != null ? currentPosition.latitude : 0.0;
answer.pos!.long = currentPosition != null ? currentPosition.longitude : 0.0;
answer.pos!.acc = currentPosition != null ? currentPosition.accuracy.toInt() : 0;
@@ -622,7 +622,7 @@ class MqttCore with ProducerMixin, ConsumerMixin {
var trackMessage = TrackPosition();
if (position != null) {
trackMessage.time = position.timestamp.toIso8601String();
trackMessage.time = Util.toUnixMillisUtc(position.timestamp);
trackMessage.lat = position.latitude;
trackMessage.long = position.longitude;
trackMessage.acc = position.accuracy.toInt();