0

I need to convert input date time to UTC format and save client machine time zone standard name, so i need standard timezone id for client machine with DST. My input is only IP Address from request header.

Dinesh
  • 1
  • 2

2 Answers2

0

You can't get a time zone from just an IP address.

You need location information - latitude and longitude. If you are communicating with a mobile device, you may be able to get these through GPS or cell-tower triangulation.

Once you have coordinates, you can use one of the techniques outlined here.

You could consider using a service that performs IP geolocation to get coordinates from the IP address. However, this is unreliable because you might not have the true IP address of the end-user. You might be looking at the IP address of a proxy server or router in some other time zone.

Community
  • 1
  • 1
Matt Johnson-Pint
  • 230,703
  • 74
  • 448
  • 575
0

You can use this

TimeZoneInfo.Local.DaylightName;
Faisal
  • 623
  • 6
  • 11