ParthJadhav / Verve

Verve is a lightweight and blazingly fast launcher for accessing and opening applications, files and documents. ⚡
GNU Affero General Public License v3.0
658 stars 25 forks source link

fix: `set_timezone` issue #28

Closed Ty3uK closed 1 year ago

Ty3uK commented 1 year ago

Fix error when offset starts with '+' or '-':

thread 'tokio-runtime-worker' panicked at 'called Result::unwrap() on an Err value: "Timezone information not found"', src/util/calculator.rs:26:32

note: run with RUST_BACKTRACE=1 environment variable to display a backtrace

For example for Asia/Almaty (located in Kazakhstan) offset_from_utc_date returns "+6" rather than "GMT+6".

This leads to an error beacuse Regex in Smartcalc expects offset with GMT in string:

https://github.com/erhanbaris/smartcalc/blob/cd39b590aba74e8ca326ba78acea488d0550a3e8/src/json/config.json#L35

ParthJadhav commented 1 year ago

Ohh, Good Catch @Ty3uK , Thanks for the Contribution 🚀

I'll merge this and create a minor release.

Ty3uK commented 1 year ago

Thanks for immediate response! ❤️