Evaluate("@Tomorrow", doc) give different dates on different servers

Hi,

I have 2 copies of the same database on 2 different servers (test & development) that has a scheduled agent run daily at 7:00 AM. Test server is on US Central Standard Time (CST) and the Development server in on US Eastern Standard Time (EST). It assigns a date value to a field:

TLogdoc.CreatedDate = Evaluate(“@Tomorrow”, TLogdoc)

The Test server comes up with the correct Tomorrow date while the Development server gives the Today date??? So, on the Development server, I make a copy of that agent and run it “On Event”, i.e as Action Menu Selection. What is puzzling is it assigns that field with the correct Tomorrow date?!?!

Both servers are in the US so the issue with different timezone/system date can be eliminated. Or is it???

For now, to get the Tomorrow date on the Development server I have to code it as:

TLogdoc.CreatedDate = Evaluate(“@Adjust(@Tomorrow;0;0;1;0;0;0)”, TLogdoc)

This is driving me totally nuts. Please someone help! Thanks!

Subject: Evaluate(“@Tomorrow”, doc) give different dates on different servers

You have to use NotesDateTime objects if you are dealing with time zones.

Replace your formula language code with

Dim DateStamp as NotesDateTime

Set DateStamp = new NotesDateTime(Now())

DateStamp.AdjustDay 1

TLogDoc.ReplaceItemValue “CreatedDate”, DateStamp

Subject: RE: Evaluate(“@Tomorrow”, doc) give different dates on different servers

Thanks Dave. I will try the NotesDateTime.

Subject: Evaluate(“@Tomorrow”, doc) give different dates on different servers

Just to rule out the obvious, is the date set correctly on your development server? Check the time/date at the OS level.

Subject: RE: Evaluate(“@Tomorrow”, doc) give different dates on different servers

Hi Esther,

The server date must be set correctly since it gives a correct date when I run it manually (Action Selection Menu). Only when it’s ran on background (Scheduled–Daily) that it gives the previous day , i.e. for Tomorrow, it gives Today, etc…

Thanks Esther.