feat: Add DateTimeUtils for converting UTC to device local time and update imports

This commit is contained in:
Achintha Isuru
2026-01-31 20:46:34 -05:00
parent c6128c2332
commit 0b38383aab
4 changed files with 29 additions and 9 deletions

View File

@@ -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';

View File

@@ -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();
}
}