If timevar is a global of type datetime, is there any reason why globals.timevar.setTime(value) should not work?
After tearing out grey hairs today, I found that this doesn’t work (result is always today’s date):
var upd_ms = upd_days * 86400000;
globals.sub_renew_to.setTime(sub_renew_date.getTime() + upd_ms);
But doing it the long way around like this does get the expected/desired result:
var upd_ms = upd_days * 86400000;
var sub_renew_to = new Date();
sub_renew_to.setTime(sub_renew_date.getTime() + upd_ms);
globals.sub_renew_to = sub_renew_to;
Environment: “Servoy R2 2.0.4 build-277 on Linux using Java 1.4.2_03”
Thanks,
Neale.