Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- final String currentTimeZone = await FlutterNativeTimezone.getLocalTimezone();
- final localTZ = getLocation(currentTimeZone);
- print(currentTimeZone);
- TZDateTime currentDateTime = TZDateTime.now(localTZ);
- TZDateTime deliveryDateTime = TZDateTime.parse(UTC, widget.delivery['shipment_workflow_due_date'] + " " + widget.delivery['shipment_workflow_due_time']);
- print("Workflow " + widget.delivery['shipment_workflow_due_date'] + widget.delivery['shipment_workflow_due_time']);
- print("Delivery Date Time in UTC: " + deliveryDateTime.toString());
- DateTime localDeliveryDateTime = new TZDateTime.from(deliveryDateTime, localTZ);
- print("Converted Delivery Date in Local: " + localDeliveryDateTime.toString());
- print("Difference: " + localDeliveryDateTime.difference(deliveryDateTime).toString());
- print("Current Local Time" + currentDateTime.toString());
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement