Multizone - a utility for working in multiple time zones
Working in incident response its important to know exactly when an event occurred. It can quickly become confusing when working across multiple time zones, sometimes you just need to know when a country’s work day starts. Even worse is dealing with timestamps without time zones specified, but then don’t forget about Daylight Savings Time (DST) as well!
I needed a simple date/time utility to serve as a quick reference. Thus Multizone, a bash script which outputs the date, time and offset from a list of predetermined zones. The core of the script is just a simple loop:
You may notice there is no way to refresh the output. Why introduce code complexity when we already have the watch command:
Combine this with tmux and pane splits, and you have a utility to quickly glance at next time you need time zone information:
You can clone the github repo here.
Another titbit, the
date command is incredibly powerful, you can convert time to any time zone you specify:
Just make sure you don’t mistype the TZ otherwise you will experience inconsistencies. You can find out more here https://www.gnu.org/software/coreutils/manual/html_node/Date-input-formats.html.
Now if only every date/time based system specified the time zone.