Getting Server Date

I have an application which fetches questions based on system date. Instead of System date, I need to take Domino Server date as some users are manipulating system date and are able to get the answers for all the questions.

How do I find the server date using LotusScript ?

The script used is as follows:

Sub Postopen(Source As Notesuidocument)

Dim session As New NotesSession

Dim db As NotesDatabase

Dim view As NotesView

Dim sdoc As NotesDocument



Set sdoc =  Source.Document

If Source.isnewdoc Then

	If Source.FieldGetText("flag") = 0  Then

		Set db = session.CurrentDatabase

		Set view = db.GetView( "QBank" )

		

		Dim tdate As New NotesDateTime(Today)

		Set doc = view.GetDocumentByKey (Cdat(tdate.DateOnly) )

		If (doc Is Nothing) Then

			Messagebox "Oops... We are not running this Contest Today..."

			source.document.SaveOptions="0"

			Source.reload

			Call  Source.close

			Exit Sub

		Else

			sdoc.QToday = doc.Question(0)

                    End If

Any solutions will be appreciated

Warm Regards,

Subject: Getting Server Date

Hi,

I have solved it myself…

I have made the foll change

Dim tdate As New NotesDateTime(doc.created)

instead of

Dim tdate As New NotesDateTime(Today)

Regards,