You will need to try to determine the location (which does not match 100%). See
this question about it.
See this question about translating a zip code into a time zone (although this again is not 100% proof).
Short version: it is complicated. You will need to use a third-party service that maintains a database of IP masks at locations, and then specify the location that is defined for the time zone.
It is more reliable that the client simply sends the time zone (or UTC offset) when it is connected.
If this is a web application, see another question about using JavaScript to determine the client’s time zone.
source
share