Skip to content

refactor(core): [P0-06c] TimeProvider migration Phase 3 — Services, ETL, DateRange #711

@cct08311github

Description

@cct08311github

Follow-up from #706 (closed by #708 which covered Phase 2).

Remaining ~27 occurrences

Batch 3: Services (~21 occurrences)

File Count Notes
DataContext.cs 2 CreateTime/UpdateTime in SaveChanges
WTMLogger.cs 2 ActionLog timestamps
LoginUserInfo.cs 1 TimeTick property
AnalysisExcelExporter.cs 1 Export timestamp
WtmFileProvider.cs 1 UploadTime
WtmDataBaseFileHandler.cs 1 UploadTime
DashboardDefinition.cs 2 Property initializers (skip — no DI)
JsonFileDashboardService.cs 2 CreatedAt/UpdatedAt
EtlQuartzJob.cs 6 Job execution timestamps
EtlSchedulerService.cs 1 Schedule check
EtlPipelineExecutor.cs 1 Pipeline start time
QuartzHostService.cs 1 Delayed start

Batch 4: DateRange static factories (~6 occurrences)

File Count Notes
DateRange.cs 6 Add optional TimeProvider? parameter

Also clean up

  • FrameworkFilter.cs: 2 remaining ?? DateTime.Now fallbacks from Phase 2

Skip (by design)

  • DashboardDefinition property initializers (no DI at construction)
  • .cshtml cache-bust, TypeExtension random data, codegen .txt templates

Key rule

  • UTC contexts: use .UtcDateTime, NOT .DateTime (preserves DateTimeKind.Utc)

Work: M | Phase: 3

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or requestin-progressWork currently in progress

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions