Bugtraq mailing list archives

Re: Lotus Notes Locations & DST


From: pzu () CH IBM COM (Peter Zuerrer)
Date: Fri, 9 Apr 1999 10:41:20 +0200


   It may be worthwhile to verify that your Notes servers do correctly
   handle daylight savings time (DST). An additional parameter must be
   added to each server's NOTES.INI file to specify DST start and end dates
   in the country where the server is located. See the setting of the
   environment variable DSTLaw below. The syntax is somewhat similar to the
   TCP/IP TZ variable.

   In countries that observe DST, Notes clients must be set to observe DST.
   An additional parameter must be added to each user's NOTES.INI file to
   specify DST start and end dates in the user's country. See the setting
   of the environment variable DSTLaw below. The syntax is somewhat similar
   to the TCP/IP TZ variable.

   The following script opens the names file NAMES.NSF, looks for the
   locations documents in the database, and changes the flag controlling
   whether or not DST should be observed. The script could be placed in a
   button hotspot in a note and sent by the Notes administrator to all
   users...

---------------------------------------------------------------------------
----------------
Sub Click(Source As Button)
     Dim session As New notessession
     Call session.SetEnvironmentVar( "DSTLaw", "3 -1 1 10 -1 1",1)
     Dim namevar As String
     namevar = session.getenvironmentstring("NAMES",1)
     If namevar = "" Then
          namevar = "names.nsf"
     End If
     Dim db As New notesdatabase ("",namevar)
     If db.isopen Then

          Dim view As NotesView
          Dim doc As NotesDocument

          Set view = db.GetView("Locations")
          Set doc = view.GetFirstDocument

          While Not(doc Is Nothing)

               doc.DST = "1"
               Call doc.Save( True, True )
               Set doc = view.GetNextDocument(doc)
          Wend
          Messagebox "All your Notes Locations have been set to Observe
Daylight Saving",,"Daylight Savings Time"
     Else
          Messagebox "You do not have a  Private Address Book named " +
namevar,,"Daylight Savings Time"
     End If
End Sub
---------------------------------------------------------------------------
----------------

Peter Zuerrer



Current thread: