No, there is no "formula" - time zone boundaries are politically determined (just look at a map of the world's time zones).
You can get a rough estimate; assuming all of your longitudes are meased in degrees East, subtract each from 360 if it's greater than 180, then divide by 15 (=360/24) to convert from degrees to hours. But that would be wrong as easily as it would be right.
Or you can get a GIS extension for your DBMS and find map data for it that includes time zone boundaries.
Or you can use the city's name to look up the timezone, and use latititude and longitude to cities near the specified point. That could also be inaccurate, since even the nearest city to a given point might be on the other side of a timezone boundary (or more than one).