Warning: This plugin is not supported in Albert >= 0.18
Extension for converting between timezones in Albert launcher
- Locate the
modules
directory in the Python extension data directory.
The data directories reside in the data directories of the application defined by Qt. Hence on linux the modules would be looked up in the following directories (in this order):
~/.local/share/albert/org.albert.extension.python/modules
/usr/local/share/albert/org.albert.extension.python/modules
/usr/share/albert/org.albert.extension.python/modules
(Note: Double-clicking on a module in the settings will open the directory in the file manager.)
- Clone this repository into your
modules
directory.
cd /path/to/modules
git clone https://github.com/DenverCoder1/timezone-convert-albert-ext.git
- Ensure that
dateparser
is installed using pip.
python3 -m pip install dateparser
- Enable the extension in the settings under
Extensions > Python
.
Type a time, followed by the word "to" or "in" and then the timezone you want to convert to.
Examples:
10pm PST to CST
8am MST in New York
You can also use "Time in..." to convert the current time to another timezone.
Time in UTC
Time in Tokyo
In config.jsonc
there are options to customize the extension:
To change the way dates are displayed, set the date_format
option.
The default is %a %d %b
(e.g. "Mon 12 Dec").
See https://strftime.org for a list of supported formats
To change the way times are displayed, set the time_format
option.
You can use %H:%M
for 24-hour time, or %I:%M %p
for 12-hour time.
The default is %I:%M %p
(eg. "12:00 PM")
See https://strftime.org for a list of supported formats
Set remove_leading_zeros
to true to remove leading zeros from the date/time.
Eg. Mon 01 Dec 01:00 PM
becomes Mon Dec 1 1:00 PM
.
The default is true
.
Set lowercase_am_pm
to replace 'AM'/'PM' with 'am'/'pm' in time formats.
The default is true
.
To add a city or abbreviation as an alias for a timezone, add it to tz_aliases
as a key-value pair.
See https://en.wikipedia.org/wiki/List_of_tz_database_time_zones for a list of supported timezones
If you have any questions, suggestions, or issues, please feel free to open an issue or pull request.
💙 If you like this project, give it a ⭐ and share it with friends!