Page 1 of 1

Setting date and time by script

Posted: Fri Oct 07, 2011 9:40 am
by Hi-Volt
Hi. I would like to set iXPanel date and time by script.
I have written this simply code:

void Data()
{
System.DateTime dt=new DateTime();
dt.AddYears(2011);
dt.AddMonths(10);
dt.AddDays(3);
dt.AddHours(8);
dt.AddMinutes(0);
dt.AddSeconds(0);

Neo.ApplicationFramework.Common.Service.ServiceContainerCF.GetService<Neo.ApplicationFramework.Interfaces.IDateTimeEditService>().SetSystemDateTime(dt);
}

but when I run it, a "Set Date/Time Failed" dialog window appears.
Could you help me?
Thank you!

Re: Setting date and time by script

Posted: Mon Oct 10, 2011 9:36 am
by Ron L.
Here's is an example project with script to set the date/time.

Re: Setting date and time by script

Posted: Tue Oct 11, 2011 12:46 am
by Hi-Volt
Thank you.
Best regards

Re: Setting date and time by script

Posted: Wed Jun 28, 2017 8:13 am
by lae17578
Has anyone got this to work? With a T7B screen the coredll.dll isnt there?