Closed qq1176914912 closed 7 months ago
Hello,
Why do you want to replace DateTime.UtcNow with DateTime.Now? By making this modification, you will break the Identity Server as the logic used to compute the iat (issue datetime) and exp (expiration datetime) parameters of an access token will be disrupted.
I assume you want to replace DateTime.UtcNow with DateTime.Now to transform the UTC DateTime into the local datetime on the website. I have made some modifications in the master branch to convert UTC datetime into your local time on the administration website.
Hello,
Why do you want to replace DateTime.UtcNow with DateTime.Now? By making this modification, you will break the Identity Server as the logic used to compute the iat (issue datetime) and exp (expiration datetime) parameters of an access token will be disrupted.
I assume you want to replace DateTime.UtcNow with DateTime.Now to transform the UTC DateTime into the local datetime on the website. I have made some modifications in the master branch to convert UTC datetime into your local time on the administration website.
Thank you for your reply. The reason for this change is that DateTimeUtcNow differs from the actual time in China by 8 hours. It seems that the time displayed in logs on address 5002 is utc time, so I want to try to change it to DateTimeNow to obtain the local time. Because of the difference of 8 hours, I am not sure whether the whole system will be affected if I follow your modification.
In the administration website (https://localhost:5002/), I made some changes in the master branch to convert all UTC DateTime values into local datetime. Can you please try again?
In the administration website (https://localhost:5002/), I made some changes in the master branch to convert all UTC DateTime values into local datetime. Can you please try again?
Thanks again for your help, no problem has been found so far.
Hello, when I use vs to try to replace all "DateTimeUtcNow" with "DateTime.Now", sometimes 5002 gets an error when switching languages: After this problem occurs, the 5002 page will be stuck, and it will display normally after refreshing the page. The database is still using the old database (the database after DateTime.UtcNow), and I find that this problem does not occur when I recreate a database or continue to use "DateTime.UtcNow". Here's how I replaced it: A total of 363 were replaced.