Open Closed

Date Time Issues #3006


User avatar
0
PSTEELNZ created
  • ABP Framework version: v5.2
  • UI type: Angular
  • DB provider: EF Core
  • Tiered (MVC) or Identity Server Separated (Angular): no
  • Exception message and stack trace:
  • Steps to reproduce the issue:"

Hi, Having Date Issues between the Angular and C# Backend. Angular

  • Date is entered as 1999-07-03 using a Date Picker Component.
  • Angular Posts the date to API as 1999-07-02T00:00:00Z (As Im located in NZ GMT+12),
  • The value is stored in the Database as 1999-07-02 00:00:00.0000000.
  • When the call is made to the API the date is returned as 1999-07-02T00:00:00
  • Angular interprets it as being local browser time and displays it as 1999-07-02
  • Each time I Hit save the date decrements due to this.

How can I solve this issue?


1 Answer(s)
  • User Avatar
    0
    PSTEELNZ created

    Added context.Services.Configure<AbpClockOptions>(options => { options.Kind = DateTimeKind.Local; });

    All seems to be fine now.

Boost Your Development
ABP Live Training
Packages
See Trainings
Mastering ABP Framework Book
The Official Guide
Mastering
ABP Framework
Learn More
Mastering ABP Framework Book
Made with ❤️ on ABP v10.0.0-preview. Updated on July 17, 2025, 06:22