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

+9 -10
View File
@@ -400,10 +400,9 @@ class _TaskListPageState extends State<TaskListPage> with ProducerMixin {
void _processPickupDeliveryStatusTask(TaskInfo taskInfo) {
Util.logInfo('Task ${taskInfo.task.sId} called');
final currentContext = context;
Future.delayed(const Duration(seconds: 1), () async {
if (!mounted) return;
showPickupDeliveryStatusPopup(currentContext, taskInfo, (tourEntry, remark) async {
if (!context.mounted) return;
showPickupDeliveryStatusPopup(MyApp.appNavigatorKey.currentContext!, taskInfo, (tourEntry, remark) async {
var answer = await _createAnswerHeader(taskInfo);
answer.code = tourEntry!.code;
answer.val = remark;
@@ -428,10 +427,9 @@ class _TaskListPageState extends State<TaskListPage> with ProducerMixin {
SystemChrome.setPreferredOrientations([DeviceOrientation.landscapeLeft]);
final currentContext = context;
Future.delayed(const Duration(seconds: 1), () async {
if (!mounted) return;
showSignaturePopup(currentContext, taskInfo, (String? signature) async {
if (!context.mounted) return;
showSignaturePopup(MyApp.appNavigatorKey.currentContext!, taskInfo, (String? signature) async {
MyApp.suppressAcceptDialog = false;
SystemChrome.setPreferredOrientations([DeviceOrientation.portraitUp]);
@@ -491,12 +489,12 @@ class _TaskListPageState extends State<TaskListPage> with ProducerMixin {
message.trId = widget.tour.id;
message.task = Task();
message.task.sId = taskInfo.task.sId;
message.task.time = DateTime.now().toIso8601String();
message.task.time = Util.toUnixMillisUtc(DateTime.now().toUtc());
var position = await MyApp.getCurrentPosition();
if (position != null) {
message.task.pos = FinTaskPos();
message.task.pos!.time = DateTime.now().toIso8601String();
message.task.pos!.time = Util.toUnixMillisUtc(position.timestamp);
message.task.pos!.lat = position.latitude;
message.task.pos!.long = position.longitude;
} else {
@@ -514,9 +512,10 @@ class _TaskListPageState extends State<TaskListPage> with ProducerMixin {
var finTourTask = FinTourTask();
finTourTask.sId = taskInfo.task.sId;
finTourTask.time = DateTime.now().toIso8601String();
finTourTask.time = Util.toUnixMillisUtc(DateTime.now().toUtc());
if (position != null) {
finTourTask.pos = FinTaskPos();
finTourTask.pos!.time = Util.toUnixMillisUtc(position.timestamp);
finTourTask.pos!.lat = position.latitude;
finTourTask.pos!.long = position.longitude;
finTourTask.pos!.acc = position.accuracy.toInt();
@@ -535,7 +534,7 @@ class _TaskListPageState extends State<TaskListPage> with ProducerMixin {
var position = await MyApp.getCurrentPosition();
if (position != null) {
finTourMessage.track = Track();
finTourMessage.track!.time = DateTime.now().toIso8601String();
finTourMessage.track!.time = Util.toUnixMillisUtc(DateTime.now().toUtc());
finTourMessage.track!.pos = FinTaskPos();
finTourMessage.track!.pos!.lat = position.latitude;
finTourMessage.track!.pos!.long = position.longitude;