I’d like to get my location from the command line to test what geocode2 or gnome location services believes my location to be. More or less I want to get to the bottom of why it it thinks I’m in a different time zone without taking guesses.
If your distribution includes it you can run /usr/lib/geoclue-2.0/demos/where-am-i to get the latitude-longitude the location service determines for you. To convert that to, e.g., a city name you need to use Geocode but I don’t think there is a command for that.
I whipped up the below simple Python demo to use Geoclue and then Geocode to print the location the location service determines for you: