I am using the following to find the Day of the Week on my server which is in UTC.
Code:
DAY=$(date --date="yesterday" +'%A')
But say if I want to find the Day of the Week in another timezone, how would one go about it. I had a look at date --help but could not find any timezone related switches so am not sure if this is possible using this method.
Update:
This appears to work but is this the only way?
Code:
DAY=$(TZ=EST date --date="yesterday" +'%A')
Thanks & Regards,