The Linux server is hosted in EST timezone. But I want to translate the output of date command to IST(Indian Standard time +5:30 hrs) format and use it in a shell script. Is there any option available for date command to do this or have manually add/subtract hours.


You can use the following command to get the date output in the timezone GMT+5:30.

$ TZ='Asia/Kolkata' date

You can choose whatever timezone you want from tzselect.

| improve this answer | |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.