Question : Find domino server time

Hi experts,

  This is very urgent. could some one tell me. How to get domino server time. I have users logging in from various zones of the world. I could not give them a consistent report on one particular context..
 
I tried the following code:
Lotus Notes always uses local/workstation time when you use/define NotesDateTime. To get Server's time with the easiest way use this code:



Code


function GetServerTime as variant

Dim ses As New NotesSession
Dim db As notesDatabase
Dim doc As notesDocument
Dim dt As Variant
Set db = ses.currentDatabase
Set doc = New NotesDocument(db)
dt = doc.created
Call doc.remove(True)
GetServerTime = dt

end function


Answer : Find domino server time

That's a clearer picture of your case. Let me explain a bit about time to you, and how any PC in a a global company should be handling it. Strange as it might seem, there is only one time, i.e. NOW! Your time is my time, and that time should be used in a server for every file and in a Domino-server in the documents: Universal Standard Time or whatever they call it. Usually, they use GMT as a point of reference. Now about your local time. Everybody lives in a timezone, and to get the local time one adds or subtracts a certain amount of hours. E.g. London is GMT, Paris is GMT+1, New York is GMT-6 and India is GMT+5:30 (yes, five hours and a half).

Conclusion. Every server and every PC in your company should be set to the same Universal Time, if times have to be compared. Every server and evry PC should also have the correct Timezone set in the configuration.

If you meet all this, you will see that a document updated on 11-11-2004 11:11:11 (universal time) will have the update time displayed in Paris as 11-11-2004 12:11:11 (CET=GMT+1) and in New Your as 11-11-2004 05:11:11

So make sure all systems run at the same universal time, and set the correct timezones. To synchronize everything, you can use the NTP protocol. With it, your server can connect to servers on the Internet that use atomic clocks for the correct time.
Random Solutions  
 
programming4us programming4us