feat: Add DateTimeUtils for converting UTC to device local time and update imports
This commit is contained in:
@@ -2,3 +2,4 @@ library core;
|
||||
|
||||
export 'src/domain/arguments/usecase_argument.dart';
|
||||
export 'src/domain/usecases/usecase.dart';
|
||||
export 'src/utils/date_time_utils.dart';
|
||||
|
||||
@@ -0,0 +1,7 @@
|
||||
|
||||
class DateTimeUtils {
|
||||
/// Converts a [DateTime] (assumed UTC if not specified) to the device's local time.
|
||||
static DateTime toDeviceTime(DateTime date) {
|
||||
return date.toLocal();
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user