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.

Learn More, Pay Less
33% OFF
All Trainings!
Get Your Deal
Mastering ABP Framework Book
The Official Guide
Mastering
ABP Framework
Learn More
Mastering ABP Framework Book
Made with ❤️ on ABP v10.2.0-preview. Updated on January 09, 2026, 07:22
1
ABP Assistant
🔐 You need to be logged in to use the chatbot. Please log in first.