3

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.

nitins
  • 2,527
  • 15
  • 42
  • 65

1 Answers1

6

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.

Khaled
  • 35,688
  • 8
  • 69
  • 98