Apr 4, 2017, 4:19 PM
94 Posts

How did I get save/modified dates of 4/15/2017 when today is 4/4/2017???

  • Category: Debugging
  • Platform: Windows
  • Release: 9.0.1
  • Role: Developer
  • Tags:
  • Replies: 4

I've been developing in Notes for 15 years and never before seen this.

While working in a test database, I added some code in a postsave event of an xpage that creates separate documents for a series of date fields in the xpage.  Although the script runs fine, the doc properties of both the newly created documents and the xpage document shows the Modified date as 4/15/2017, but today is 4/4/2017.  Note also that the time is incorrect.  This document was actually saved around 3:00pm today.

I checked with my customer I.T. Manager and he assures me that the Domino server has the right date on it and other documents from the production database are reflecting the correct save/modified dates.

Apparently, this is only happening with the test database.  What could cause this and how do I fix it?

This test database has been in place for almost 7 years.

Apr 5, 2017, 3:18 AM
122 Posts
How did I get save/modified dates of 4/15/2017 when today is 4/4/2017???

One possible culprit is creating a lot of documents in a very short amount of time. The date/time created is not typically stored on a document in a field. Instead it is identified via the UNID (see http://www-12.lotus.com/ldd/doc/domino_notes/9.0/api90ug.nsf/85255d56004d2bfd85255b1800631684/00d000c1005800c985255e0e00726863?OpenDocument). However, since UNIDs need to be unique, create enough documents in the future, and it will increment the UNID. If you're following where that goes, it means the created date will also get incremented, into the future.

If there is a $Created item on the document, this takes precedence (see http://www-12.lotus.com/ldd/doc/domino_notes/9.0/api90ref.nsf/f961929dc6dc14dc852561bf0067d1c4/85255d56004d3f63852564da001213e9?OpenDocument), which is what you would typically do if you set the UNID (instead of letting Notes/Domino automatically calculate it) and want to keep the created date/time.

Apr 5, 2017, 9:28 AM
94 Posts
I saw that, too, but...

If this were just on a set of auto created documents, then I would understand.   And, no, I'm not using a $Created field anywhere.

I also noticed late yesterday that the date on the database itself is 4/15.  It's that way on the customers server, however, my local replica still shows the current date correctly.

I also noticed that the time is fishy.  Yesterday, the document for my xpage showed a save time of 5:32:38 PM (even though I did that around 3:00pm)

Just this morning at 9:20am, I saved that same document again and now it shows the save time is 5:32:45 PM.

It's not just this document, either - I tried saving another one 5 minutes after this one and got the same save date, but a time of one millisecond later, 5:32:46 PM.

Is there a fixup command that I can try that might clear this up?

Apr 12, 2017, 3:32 PM
26 Posts
This sort of thing can happen
This sort of thing can happen if someone on the server clicks on the windows calendar/clock in the status bar and changes the date and time.  Sometimes people just want to see for example what day falls on a certain day, and don't realize that can screw up domino/Notes time date stamps.  The same thing can happen if working with a local replica and you click on the date/time in windows.
Apr 12, 2017, 7:18 PM
94 Posts
But, why would it still be happening?

So, following your example, perhaps someone did mess with the windows clock at some point.  It shows correct now.  So, why would the db and documents still get a messed up date/time?  If Notes uses the system date/time, then I would think that now that the clock is correct, then Notes would be using the correct date/time.  I'm just not understanding how all this works - but, regardless - how do I get it fixed?