Get timezone by Country and Region

Finally, after long research, I’ve found the solution. It may not be much accurate, but it does not require the dependency of remote service.

I’ve found that maxmind’s database provides mapping file between regions and time zones from Olsen database (aka tz database): http://www.maxmind.com/timezone.txt

The second step was to convert Olsen timezones in .NET timezones. The best suitable solution was found here: https://www.timdavis.com/posts/olson-time-zone-database-to-standard-windows-time-zone-v0-1
So I’ve edited it a bit and converted it to CSV file to read it from .NET.

Hope it will help somebody.

Leave a Comment