NGeo.GeoNames.GeoNamesContainer.TimeZone C# (CSharp) Method

TimeZone() public method

public TimeZone ( TimeZoneLookup lookup ) : TimeZoneExtended
lookup TimeZoneLookup
return TimeZoneExtended
        public TimeZoneExtended TimeZone(TimeZoneLookup lookup)
        {
            if (lookup != null) lookup.UserName = _userName;
            return _client.TimeZone(lookup);
        }

Usage Example

示例#1
0
        public void GeoNames_TimeZone_ShouldReturnAmericaNewYorkForLehigh()
        {
            using (var geoNames = new GeoNamesContainer(UserName))
            {
                var result = geoNames.TimeZone(new TimeZoneLookup()
                {
                    Latitude   = 40.60326613801468,
                    Longitude  = -75.37771224975586,
                    RadiusInKm = 1.0,
                });

                result.ShouldNotBeNull();
                result.Id.ShouldEqual("America/New_York");
            }
        }
All Usage Examples Of NGeo.GeoNames.GeoNamesContainer::TimeZone