Arabic Date issues
See original GitHub issueDears, I faced issues when dealing with Dates in Arabic Language All of my entities are audited entities and they have CreationTime that i need to display on each screen or grid. First Issue, I want dates to be saved in db as UTC so, i changed the clock provider in startup class
{
//Initializes ABP framework.
app.UseAbp(options =>
{
options.UseAbpRequestLocalization = false; //used below: UseAbpRequestLocalization
Clock.Provider = ClockProviders.Utc;
});}
but when i displayed them using Arabic language, i got something like that The expected behavior should be CreationDate should be displayed in full Gregorian date
Second Issue:- When i try to update existing entity in Arabic language, The date is saved in database in Hijri Althouth i changed my default clock provider to be utc 1439-10-13 15:27:27.7960000 This is the date that is saved in my sql server when updating existing entity and this issue break our application @acjh @hikalkan @ismcagdas
Issue Analytics
- State:
- Created 5 years ago
- Comments:9 (3 by maintainers)
Top GitHub Comments
Thank you very much Ismail. It works fine.
I just want to mention an important point! If you want to give the user the ability to switch between two languages (in my case English and Arabic) then as you said you need to execute other request culture localizers in your custom class (like this one https://github.com/aspnetboilerplate/aspnetboilerplate/blob/master/src/Abp.AspNetCore/AspNetCore/Localization/AbpUserRequestCultureProvider.cs). Using this class as it is won’t work and you need to modify as follow:
To force using the culture: (StringSegment)“en-US” in case of Arabic. @ismcagdas
Ok I’ll try that and back to you with the results.