abpframework / abp

Open-source web application framework for ASP.NET Core! Offers an opinionated architecture to build enterprise software solutions with best practices on top of the .NET. Provides the fundamental infrastructure, cross-cutting-concern implementations, startup templates, application modules, UI themes, tooling and documentation.
https://abp.io
GNU Lesser General Public License v3.0
12.97k stars 3.45k forks source link

Incorrect DateTime Format :displaying DateTime (hijri) after upgrading #16959

Open muhammedshaaban7 opened 1 year ago

muhammedshaaban7 commented 1 year ago

Is there an existing issue for this?

Description

Reproduction Steps



- Execute the API call to the endpoint and observe the response.
- Inspect the returned MyDto object and check the value of the MyDate property.

### Expected behavior

I expected the datetime values to continue being displayed in the Hijri calendar format, as it was in ABP Framework v3.2.1.

### Actual behavior

The datetime values are now being displayed in the Gregorian calendar format, which is not the desired behavior.

### Regression?

_No response_

### Known Workarounds

_No response_

### Version

7.2.2

### User Interface

Common (Default)

### Database Provider

EF Core (Default)

### Tiered or separate authentication server

None (Default)

### Operation System

Windows (Default)

### Other information

_No response_
maliming commented 1 year ago

hi

We are using System.Text.Json to serialize the DTO. You can configure its options.

https://docs.abp.io/en/abp/latest/JSON

muhammedshaaban7 commented 1 year ago

Thank you for your response and continued support. I understand that you suggested configuring System.Text.Json options, but I would like to inform you that our application currently relies on Newtonsoft.Json for serialization. In fact, we have already configured the AbpNewtonsoftJsonSerializerOptions according to ABP Framework's guidelines.

Despite these efforts, we are still experiencing the problem where datetime values are not being displayed in the desired Hijri calendar format.

In the previous version (3.2.1) of ABP Framework, the datetime formatting worked perfectly fine, and the dates were displayed in the expected Hijri calendar format. It was only after upgrading to version 7.2.2 that we encountered this change in behavior.

Thank you once again for your time and assistance.

maliming commented 1 year ago

hi

Can you share a simple project to reproduce?