A Forum reader recently asked:
“I’m trying to display the eDirectory loginTime in NSL whenever user log in to NSL. I have managed to retrieve the eDirectory loginTime in the SYN_TIME format – e.g., 20071016092115Z. I can display that in NSL, but how do I display it in the correct GMT time format?”
And here’s the response from David Guest …
You can solve the problem with a little bit of clever scripting using regex. Try something like this:
regsplit "(....)(..)(..)(..)(..).*" ?LoginTime ?Year ?Month ?Date ?Hour ?Minute MessageBox "You logged in at " ?Hour ":" ?Minute " Today
You may want to do some math on the Hour variable to display it in the form you want (adding or removing hours, for example). But that should work – you can also use the date if you want to.
Disclaimer: As with everything else at NetIQ Cool Solutions, this content is definitely not supported by NetIQ, so Customer Support will not be able to help you if it has any adverse effect on your environment. It just worked for at least one person, and perhaps it will be useful for you too. Be sure to test in a non-production environment.