Quantcast
Channel: THWACK: All Content - All Communities
Viewing all articles
Browse latest Browse all 20202

ConvertDate Function returns incorrect date

$
0
0

I wasn't really sure where the best place to put this was I figure since it's a script question I'd put it here, even though it's a script for a SAM monitor.

 

What I'm using is this.-> SolarWinds Knowledge Base :: How to monitor your SSL certificate expiration date.
I have it setup as a Windows Script Monitor in SAM 6.1.

I noticed, thankfully early enough, that the function at the end of the script ConvertDate() returns an incorrect date for some of my certs. I'm monitoring 38 SSL certs and 13 of them return incorrect values where it's swapping the month and the date while getting converted..

 

I modified the output for troubleshooting to echo the variables in the calculation and this is what I get

The variable "Expiry" returns a value of May 1 20:55:32 2015 GMT, which is correct

The variable "ExpDate" returns 1/5/2015, which is obviously not the same as above

It then calculates the DaysLeft variable, but since ExpDate is incorrect, I get the wrong results.

 

 

The issue, to me, seems to lay squarely in the ConvertDate function as the rest of the script works and is working great for my 25 other domains I'm monitoring. But I can't for the life of me figure out why.

 

a handful of the domains it's not working for are: (remove the undercores, I don't want these sites to be searchable here):

www.sellc_ashad_vances.com - Expiry=May 1 20:55:32 2015 GMT, ExpDate=1/5/2015

webmail.naba_ncard.com - Expiry=Jan 11 23:02:36 2015 GMT, ExpDate=11/1/2015

myres_ourceportal.com - Expiry=Jan 3 14:12:55 2015 GMT,  ExpDate=3/1/2015

 

 

Any help is appreciated.


Viewing all articles
Browse latest Browse all 20202

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>