Last post Apr 07, 2020 10:10 AM by timur.kh
Apr 07, 2020 09:38 AM|rajemessage|LINK
in asp.net core 3.0 web api
if I keep one zone like india. and change the region to amarica or iraq, then will it affect the comparison of datetime or ordering of datetime
that means is the calendar is the same which we generally see in "eng us"
what I have noticed is the first weekday changes with the region.
so I thought I should not affect the comparison and ordering because 1st of feb will always bigger than 31st of jan. in all-region.
Apr 07, 2020 10:10 AM|timur.kh|LINK
I presume you talk about
DateFormatInfo differences? In this case, different
cultures would have different settings associated with them.
I am not sure I get the "1st of Feb being greater than 31st of Jan" paragraph - it appears you try to compare two formatted strings instead of
DateTime objects. You probably should correct that to compare actual
DateTimes as these represent moments in time and do not depend on culture for comparison purposes.
One way you can eliminate this uncertainty around users culture would be to force your comparisons in a