blob: ee10ac116a751d25d8c3ea2cd787510512653876 (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
|
#!/usr/bin/env bash
format="%H:%M"
current_time=$(date +"$format")
time="${1:-$current_time}"
C_RESET=`tput sgr0`
C_GRAY="$(tput setaf 7)$(tput dim)";
C_HIGHLIGHT="$(tput setaf 7)$(tput bold)"
label() { printf "$C_GRAY$1: $C_HIGHLIGHT"; }
space() { echo -e "$C_RESET"; }
space
label "IST -> CET"
TZ=CET date --date="$time IST" +"$format CET"
space
label "CET -> IST"
date --date="$time CET" +"$format IST"
space
|