#!/bin/bash
#Copyright 2014 Brendan Perrine
# This is a simple bash script that shows the offset to UTC from your current time zone 



echo " $(date  +%H) - $(date  -u +%H) "|bc


#!/bin/bash
#Copyright 2014 Brendan Perrine
# This is a simple bash script that shows the offset to UTC from your current time zone 

 
#note that can't have same day on different years as are not that many time zones  
if [ $(date +%j)  -eq $(date -u +%j) ] ; then 
  echo " $(date  +%H) - $(date  -u +%H) "|bc
#new years first because of otheruwise I can't use day number accuratly
elif [ $(date +%Y) -gt $(date -u +%Y ) ]; then 
  echo " [[$( date +%H )+24 ]]  - $(date -u +%H)"|bc
elif [ $(date +%Y) -lt $(date -u +%Y) ] ;then
  echo " $(date +%H ) -  [[$( date +%H )+ 24 ]] "|bc
elif [ $(date +%j ) -gt $( date -u +%j )] ; then 
 echo " [[$(date +%H +24) ]] - $(date -u +%H) "|bc 
else 
 echo "$(date +%H ) - [[$( date -u +%h) + 24 ]]  "|bc
fi 

Add support for calendar date different than utc
Add support for calendar date different than utc

Added support for the new year as first case so then I could easily use the day number in the second case
Made a lot of if statements but is good in best case if you are on same day as utc.
