Hello Users,
Unable to get moment to resolve the time to right timeZone using KoreUtil moment library.
KoreUtil - moment resolves to UTC date rather than the timezone set using tz.setDefault when real UTC date is different
var x;
if(context.entities.time === "IST"){
koreUtil.moment.tz.setDefault("Asia/Kolkata")
x = "T01:00:00+05:30"
}else{
koreUtil.moment.tz.setDefault("America/New_York")
x = "T22:00:00-04:00"
}
print(x)
print("\n")
print("current time = " , koreUtil.moment())
print("\n")
print("loaded time with format = ",koreUtil.moment(x,"THH:mm:ssZ"))
Output
There is an outstanding issue with moment (Third party code). Once this is fixed, this issue will be resolved. The issue is NOT at Kore.ai’s end.