CSD 2.0 Software Catalog items

NS16
Mega Sage

Hi Experts,

I am currently working on Client Software Distribution 2.0 application.

Under this, I am creating Software Catalog items from Microsoft Endpoint Configuration Manager -> Application.

 

So basically on each SCCM application, there is an OOTB Create Catalog item-related link via this I am creating a Catalog item.

 

Once I click on that link catalogue item is auto-creating which includes flow/variable sets/ short description/ description etc.

 

Question- I was trying to submit catalog item from portal but there are 2 variables Lease start and Lease end with date and time format. I was getting below field error on each of them

 

Lease start time must be later than current time

 

Where lease start time is 01-03-2023 16:10:57 and current time is 01-03-2023 15:09:57

 

There is OOTB client script and I added alert in that, getting below output 

current time 1677644009022 new Time - 1672722657000

 

I tried to covert timestamp in date and time format with the help of below script 

var gdt = new GlideDateTime();
    gdt.setNumericValue(1677644009022);
    gs.addInfoMessage("current time " +gdt);
    var gdt1 = new GlideDateTime();
    gdt1.setNumericValue(1672722657000);
    gs.addInfoMessage("new time " +gdt1);
 
Output of the script
current time 2023-03-01 04:13:29
new time 2023-01-03 05:10:57

Cuurent time and new time is diffenert.

I also check my timezone and system timezone, both were same.

 

I am not sure how to solve the issue, Please giude me on above.

 

Many thanks,

NS

1 REPLY 1

jimclaussen-cas
Tera Contributor

I know this was submitted a while ago but just had the same issue and I did the following to resolve...

There is a catalog client script named "Validate CSD Lease on Submit"   It references a function named "toInternalDateFormat" but the function is never called so I added the following line after the lease_start variable declaration on line 2.

lease_start = toInternalDateFormat(lease_start);

 

This sets the variable with the correct user format and you can submit the request.