Open marcoziti opened 5 years ago
Library to use: https://github.com/pegler/pytzwhere
>>> from tzwhere import tzwhere >>> tz = tzwhere.tzwhere() >>> print(tz.tzNameAt(53.68193999999999, -6.239169999999998)) None >>> from tzwhere import tzwhere >>> tz = tzwhere.tzwhere(forceTZ=True) >>> print(tz.tzNameAt(53.68193999999999, -6.239169999999998, forceTZ=True)) Europe/Dublin
julia> Pkg.add("TimeZones") # Changing time zones dt = DateTime(2015, 1, 1, 0) zdt_utc = ZonedDateTime(dt, utc; from_utc=true) zdt_warsaw = ZonedDateTime(dt, warsaw; from_utc=true)
>>> longitude = 121.52059 >>> latitude = 31.204181 >>> from timezonefinder import TimezoneFinder >>> tf = TimezoneFinder() >>> tf.timezone_at(lng=longitude, lat=latitude) 'Asia/Shanghai'
Library to use: https://github.com/pegler/pytzwhere