fulldecent / corelocationcli

Command line program to print location information from CoreLocation
MIT License
217 stars 29 forks source link

Use inferred timezone for time field in output #31

Closed AstroCB closed 4 years ago

AstroCB commented 4 years ago

Since an inferred timezone is returned as part of the placemark data, it can be used to localize the timestamp string given in the JSON blob, as well as the string data (if requiresPlaceMarkLookup is toggled on as the result of one of the other format specifiers).

This PR just alters the time field (in both the JSON output and the formatted string output) to use the user's inferred timezone if available – it outputs in exactly the same format as the default, but will use the correct timezone instead of UTC. If this isn't available, it falls back to UTC (the existing behavior).

fulldecent commented 4 years ago

Thank you for sharing. Please implement this as a new field rather than losing the existing field. Maybe the new field can be time_local.

AstroCB commented 4 years ago

Done!

fulldecent commented 4 years ago

Yup, that looks great, thank you!

fulldecent commented 4 years ago

Released version 3.2.0.

I'm not sure how our version gets bumped in Homebrew. Somebody else did this last time, possibly automatically, and I don't see documentation of how that works.

AstroCB commented 4 years ago

Done.

Also filed a PR #32 to link to the instructions I used for filing this (it was automated with their script).

fulldecent commented 4 years ago

Awesome, thank you, merged