Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,15 @@ class ExportTransactionsCsvUsecase {

final transactions = await _getTransactionsUsecase.execute();

// Preserve the input's UTC-ness when rounding up to the next day:
// building a plain (local) DateTime from a UTC end's wall-clock fields
// shifted the inclusive-day boundary by the machine's UTC offset, so
// the same export included or excluded edge transactions depending on
// the device's timezone.
final exclusiveEnd = end == null
? null
: end.isUtc
? DateTime.utc(end.year, end.month, end.day + 1)
: DateTime(end.year, end.month, end.day + 1);

final filtered = transactions.where((tx) {
Expand Down