LotusScript AdjustDay Changing DateFormat (Help!)

Strange issue when using datetime.adjustday changing the date format when running in a scheduled agent on a (new’ish) 8.5.1 server. I am in NZ and the date format is dd/mm/yyyy, and the server is displaying this format.

Here is an example (running 05 March 2010)…

Dim checkDate As New NotesDateTime(Today)

Print “CheckDate: " & checkDate.Lslocaltime ‘== this returns 5/3/2010, this is correct 5th of March

Call checkDate.AdjustDay(4)

Print “After adjust Day, CheckDate: " & checkDate.Lslocaltime ‘== this returns 5/7/2010 when it should be 9/3/2010 ARGHHH!!!

If I manually run the agent, the AdjustDay works as expected.

Regional settings on the server are correct.

Have found the Technote which states to change the registry entry “HKEY_USERS/DEFAULT/Control Panel/International/iDate” to “1 = D/M/Y” to fix the date format (this worked, server date is correct), but the bloody AdjustDay (and AdjustMonth) is changing the wrong value.

What am I missing???

I could really use some assistance here, as this is impacting on many applications (sending notifications, reminders, archiving records, etc).

Thanks in advance for any support.

Cheers!

Subject: LotusScript AdjustDay Changing DateFormat (fix))

Well, found in the registry that the Computer\HKEY_USERS.DEFAULT\Control Panel\International\sLongDate and sShortDate were still showing in mm\dd\yyy (US) format, ignoring the OS Regional Settings… argh!

Hope this helps someone else.

Subject: Just linking these threads together

http://www-10.lotus.com/ldd/nd85forum.nsf/DateAllThreadedWeb/d1977e16a19d1c48852576e8007286f2?OpenDocument