I have a form that could be created in just about any time zone. Right now, the edit history shows the date/time edited in the time zone of the user who is editing it. However, because of SLAs and expectations, we need the history to be consistant in the time zone that it shows - in other words, even though I create a document at 3:22PM my time, it needs to show created at 2:22 CST. That way, when the document is created at 9:00AM in California and acknowledged at 11:30 AM in Houston, it doesn’t look like it sat for 2 1/2 hours - just 30 minutes. How do I do this?
Subject: Adjust to Specific Time Zone
No adjustment is required if the data as dates / times.
If you’re converting things to Text then you’re going to have problems!!
If something is created at 9:00am PST and acknowledge at 11:30am CST.
When the person in California opens it they will see it was opened at 9:00am PST and acknowledge at 9:30am PST.
When the person in Houston opens it they will see it was opened at 11:30am CST and acknowledge at 11:30am CST.
Just like someone who creates a meeting invite for 9:00am PST on their calendar and sends it to someone in CST, it shows on their calendar as 11:00am CST.
For example this document was created at 4:16pm Eastern, but someone in Pacific, it looks like it was created at 1:16 pm and to someone in India it looks like it was creaeted Feb. 23rd.
Subject: RE: Adjust to Specific Time Zone
Okay, so the problem is that it is being converted to a text field. I didn’t create this - just inherited it, so I’m a bit worried about changing it. But if one of you could tell me how, I would feel better … ![]()
Here’s the code now - this is in a hidden field, and then there is a display field that actually shows it. Can I just change this field to change it to a date/time?
@If(@IsNewDoc & @IsDocBeingRecalculated = 0 & @IsDocBeingSaved = 0; “”;
@IsDocBeingSaved; @Trim(@Text(@Now) : @If(@Elements(PastEditDates) > 9; @Subset(PastEditDates; 9); PastEditDates));
PastEditDates)
Subject: RE: Adjust to Specific Time Zone
Unfortunately, you cannot always flip a text version of a date/time back to a date time as it normally depends upon the regional configuration of the person saving the document. If the document is updated always by a server agent, you might be in more luck.
For example I use yyyy-mm-dd hh:mm:ss as my date format so @Trim(@Text(@Now) woudl set it to
2008-02-25 05:00:00pm EST.
However a co-worker may have their settings set to mm/dd/yy hh:mm:ss in Alberta and it would then save:
02/25/08 03:00:00pm MST
If I try and create a datetime using their information, the system would generate an error. So what you need to do it look at the data and try and figure out the date format they are using and get the individual parts. year, month, day.
The problem is always with dates like 2/1/2008 - does that mean Feb 1st or Jan. 2nd? Maybe you can figure out based on the create date.
Subject: Adjust to Specific Time Zone
the setting is located in the field’s properties box; you need to set the way it’s displayed.
Subject: Adjust to Specific Time Zone
Couldn’t you just use the NotesDateTime.ConvertToZone method in the QuerySave event?