The easiest way is to just use one of the files that includes time zone data from the moment-timezone home page, such as moment-timezone-2010-2020.js
or moment-timezone-all-years.js
(or the minified versions).
You can however add just a single zone if you prefer. You can find the zone's packed string within the data files listed above. For India, the full zone definition is:
moment.tz.add("Asia/Calcutta|HMT BURT IST IST|-5R.k -6u -5u -6u|01232|-18LFR.k 1unn.k HB0 7zX0");
moment.tz.link("Asia/Calcutta|Asia/Kolkata");
You may or may not need the link, depending on what exactly you're doing.
Note that I assumed that by "IST" you mean India Standard Time, and not Irish Standard Time or Israel Standard Time. Those zones would have different data, of course.
Also, since India has been on UTC+5:30 since 1942, you may just wish to use a fixed offset - which would eliminate the need to use moment-timezone. Just use the utcOffset
function in moment. For example, both of the following will return the current time in India.
moment().utcOffset("+05:30").format()
or
moment().utcOffset(330).format()
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…