You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
What was broken
Date filters could omit the selected end date or, after making it inclusive, show late July 31 SFDC payments as August 1. Monthly BA fees could also place those payments in the next month.
Root cause
Finance payment timestamps are stored as UTC values without timezone metadata. Date bounds were interpreted as instants or through the database session timezone, while SFDC output applied the America/New_York conversion in the wrong direction.
What was changed
Interpret report filters as calendar dates with half-open next-day bounds. Convert SFDC New York calendar bounds to UTC for payment storage, return payment dates with the correct New York offset, and group BA fees by the corrected New York date.
Any added/updated tests
Updated SQL regression coverage for payment accruals, SFDC payments, both BA fee variants, monthly buckets, and report-directory metadata. PostgreSQL 16 checks cover the July 31 boundary and daylight-saving transitions.
"Start date (inclusive) for filtering payment creation date in ISO 8601 format",
8
-
example: "2024-01-01T00:00:00.000Z",
7
+
"Start date (inclusive) for filtering payment creation date in YYYY-MM-DD format. For accepted ISO timestamps, only the written calendar-date portion is used",
8
+
example: "2024-01-01",
9
9
})
10
10
@IsOptional()
11
11
@IsDateString()
12
12
startDate?: string;
13
13
14
14
@ApiPropertyOptional({
15
15
description:
16
-
"End date (inclusive through the full calendar day) for filtering payment creation date in ISO 8601 format",
16
+
"End date (inclusive through the full calendar day) for filtering payment creation date in YYYY-MM-DD format. For accepted ISO timestamps, only the written calendar-date portion is used",
"Member payment accruals for challenge payments (contest, review board, copilot, checkpoint, and related challenge payouts) for the provided date range (defaults to last 3 months)",
Copy file name to clipboardExpand all lines: src/reports/sfdc/sfdc-reports.dto.ts
+12-6Lines changed: 12 additions & 6 deletions
Original file line number
Diff line number
Diff line change
@@ -241,8 +241,9 @@ export class PaymentsReportQueryDto {
241
241
242
242
@ApiProperty({
243
243
required: false,
244
-
description: "Start date for the report query in ISO 8601 format",
245
-
example: "2023-01-01T00:00:00.000Z",
244
+
description:
245
+
"Start date (inclusive from the start of the America/New_York calendar day) for the report query in YYYY-MM-DD format. For accepted ISO timestamps, only the written calendar-date portion is used",
246
+
example: "2023-01-01",
246
247
})
247
248
@IsOptional()
248
249
@IsDateString()
@@ -251,7 +252,7 @@ export class PaymentsReportQueryDto {
251
252
@ApiProperty({
252
253
required: false,
253
254
description:
254
-
"End date (inclusive through the full calendar day) for the report query in ISO 8601 format",
255
+
"End date (inclusive through the full America/New_York calendar day) for the report query in YYYY-MM-DD format. For accepted ISO timestamps, only the written calendar-date portion is used",
255
256
example: "2023-01-31",
256
257
})
257
258
@IsOptional()
@@ -332,6 +333,11 @@ export class PaymentsReportResponse {
332
333
description: "Winnings category from finance.winnings.category",
333
334
})
334
335
category: string;
336
+
@ApiProperty({
337
+
description:
338
+
"Payment creation timestamp in America/New_York with its UTC offset",
339
+
example: "2026-07-31T18:53:33.383-04:00",
340
+
})
335
341
paymentDate: string;
336
342
paymentId: string;
337
343
paymentStatus: string;
@@ -854,8 +860,8 @@ export class BaFeesReportQueryDto {
854
860
@ApiProperty({
855
861
required: false,
856
862
description:
857
-
"Start date for the report query in ISO 8601 format (inclusive). If omitted the report uses an open-ended lower bound.",
858
-
example: "2023-01-01T00:00:00.000Z",
863
+
"Start date (inclusive from the start of the America/New_York calendar day) for the report query in YYYY-MM-DD format. For accepted ISO timestamps, only the written calendar-date portion is used. If omitted the report uses an open-ended lower bound.",
864
+
example: "2023-01-01",
859
865
})
860
866
@IsOptional()
861
867
@IsDateString()
@@ -864,7 +870,7 @@ export class BaFeesReportQueryDto {
864
870
@ApiProperty({
865
871
required: false,
866
872
description:
867
-
"End date (inclusive through the full calendar day) for the report query in ISO 8601 format",
873
+
"End date (inclusive through the full America/New_York calendar day) for the report query in YYYY-MM-DD format. For accepted ISO timestamps, only the written calendar-date portion is used",
0 commit comments