I need to display time on my asp.net c# website. I know about taking time from server side but what I need is a library which can show time on clients machines according to their specific country/state e.g if my client open website in american then the clock should be according to america timezone and if he opens site from any other country then the time should be according to that area.Hope you will get my point.
Asked
Active
Viewed 35 times
1 Answers
0
My thought is to use the https://freegeoip.net/ site, passing in the user's IP address to get their timezone.
Then use the TimeZoneInfo class. Hopefully, the timezone reported by FreeGeoIP will match the string needed for the FindSystemTimeZoneById method.
See the example in the FindSystemTimeZoneByID
() method.

Rob Johnston
- 859
- 8
- 21