handle-dates-and-time
Installation
SKILL.md
Handling Dates and Time
Use IClock instead of calling DateTime.Now or DateTime.UtcNow in application/domain code. AbpClockOptions.Kind defines the application's normalization policy; UTC is the only mode that enables multiple-timezone conversion.
When to Use
- Choose a single
DateTimeKindpolicy for an application. - Normalize inbound and persisted
DateTimevalues. - Understand how EF Core and auditing consume
IClock. - Convert UTC instants to the current request's timezone or local wall time back to UTC.
- Convert and enumerate Windows/IANA timezone identifiers through
ITimezoneProvider.
When Not to Use
- Define general setting values/providers — use manage-settings-and-features.
- Configure which requests/actions/entities are audited — use configure-audit-logging.
- Configure tenant resolution, tenant switching, or data filters — use configure-multi-tenancy.