How can i get the current server time in lotus script

hi all how can i get the current server time in lotus script.

Regards

Animesh Kumar

Subject: how can i get the current server time in lotus script

Dynamically create a doc with db.cretedocument and find the doc.created value.This will give the current server time in web based.

Subject: RE: how can i get the current server time in lotus script

You left out an important detail — the document created must be in a database on the server if you want the time on the server – otherwise you get the time on the client. Here’s a snippet from code that I use:

Dim locDB As New NotesDatabase( “”, “” )

Set locDB = Sess.GetDatabase( “”, “names.nsf” )

Set doc = locDB.CreateDocument

LocTime = Doc.Created

tmpStr$ = “Current time is: " & LocTime & " on your PC.”

Dim srvDB As New NotesDatabase( “”, “” )

Call srvDB.Open( “servername”, “names.nsf” )

Set doc = srvDB.CreateDocument

tmpStr$ = tmpStr$ & Chr(10) & "Current time is: " & Doc.Created & " on server: " & Listtag(i)

Subject: RE: how can i get the current server time in lotus script

also you can use

Evaluate(|@Now( flags ; serverNames )|)

see help in r6

Manu

Subject: RE: how can i get the current server time in lotus script

Hi manu Thank you for the response but i am working in notes .and i have tried that but it has not worked. the best way to check your server time just change the time zone of your PC.and restart then check that code will take Local PC time …

Subject: RE: how can i get the current server time in lotus script

Not sure if tinkering with the timezone on the PC is a valid test of whether a stored value is Client or Server time.

In a number of situations Notes will apply the PCs timezone setting to a server time to “translate” the server time in to your timezone.

A classic example of this is look at the document properties for a doc on the server for the Created time. Change your timezone and then look again. The time has changed!

HTH - Rufus.