Time zone fix
This commit is contained in:
parent
a80f09b9c0
commit
1c73595d07
|
|
@ -3,6 +3,7 @@ import 'dart:async';
|
||||||
import 'package:flutter/material.dart';
|
import 'package:flutter/material.dart';
|
||||||
import 'package:flutter_riverpod/flutter_riverpod.dart';
|
import 'package:flutter_riverpod/flutter_riverpod.dart';
|
||||||
import 'package:geolocator/geolocator.dart';
|
import 'package:geolocator/geolocator.dart';
|
||||||
|
import 'package:timezone/timezone.dart' as tz;
|
||||||
|
|
||||||
import '../../models/duty_schedule.dart';
|
import '../../models/duty_schedule.dart';
|
||||||
import '../../models/profile.dart';
|
import '../../models/profile.dart';
|
||||||
|
|
@ -671,7 +672,14 @@ class _ShiftTemplate {
|
||||||
final Duration duration;
|
final Duration duration;
|
||||||
|
|
||||||
DateTime buildStart(DateTime day) {
|
DateTime buildStart(DateTime day) {
|
||||||
return DateTime(day.year, day.month, day.day, startHour, startMinute);
|
return tz.TZDateTime(
|
||||||
|
tz.local,
|
||||||
|
day.year,
|
||||||
|
day.month,
|
||||||
|
day.day,
|
||||||
|
startHour,
|
||||||
|
startMinute,
|
||||||
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
DateTime buildEnd(DateTime start) {
|
DateTime buildEnd(DateTime start) {
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue
Block a user