Problem: @Now captured different time

Hi,I use the following formulas in the field “EditDate” to capture the date/time on server:

@If(@IsDocBeingSaved; @If(EditDate = “”; @Created; @Now ([ServerTime];“CurrentServerName”) : @If(@Elements(EditDate) > 9; @Subset(EditDate; 9); EditDate)); EditDate)

Problem is on “@Now ([ServerTime];“CurrentServerName”)”:

If I edit/save some existed document, it captured the date/time such as “03/06/2007 05:08:17 PM EST” which I can tell it’s got from the server time; however, if I edit/save this same document again, it will display the date/time as “03/06/2007 04:08:37 PM CST” which I know it’s come from my local time zone.

I don’t know the reason. Why it sometimes got the server time, and sometimes not?

Subject: Problem: @Now captured different time

It doesn’t matter. 4 PM CST is the same as 5 PM EST. All time is compared as if it is local time and handles the conversion appropriately for the timezone.

Subject: RE: Problem: @Now captured different time

I want all of them to be displayed as “EST” time zone which captured from the server. Apparently “CST” is got from the local time.Do you know why sometimes it’s “EST”, sometimes it’s “CST”?

Subject: Problem: @Now captured different time

Do you happen to have a local replica of the db you are doing this on? Is there any chance that it thinks the server isn’t there and is running locally?

Also, what is assigning the value to “CurrentServerName”? Since you don’t specify a localtimeonerror, I’m not sure how it responds, but I thought it should error out…

Subject: RE: Problem: @Now captured different time

  1. There is no replica;2. I put this app on the develop server, and the “CurrentServerName” is the name of that server. I don’t think there will be any error.