Novell Home

Displaying the eDirectory loginTime in NSL

Novell Cool Solutions: Tip
By David Guest

Digg This - Slashdot This

Posted: 28 Nov 2007
 

Problem

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 ...

Solution

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.


Novell Cool Solutions (corporate web communities) are produced by WebWise Solutions. www.webwiseone.com

© 2014 Novell