Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Differences between real time and time stamp CMS_AUDITTABLE

Status
Not open for further replies.

JeroenBoon

Technical User
Aug 15, 2002
106
NL
Hello,

I have a 2 hour time difference between the {CMS_AUDITTABLE.timestamp} and my real time. Does anyone know where this difference can come from?
(BTW: Schedules etc run exactly on time, CR10, CE10, Oracle)

Thanks, Jeroen.
 
Is there a difference between the server(s) your CMS is on and your workstation in the TimeZone set in Windows ?

-Dell

A computer only does what you actually told it to do - not what you thought you told it to do.
 
@ hilfy: no, there isn't.
@ KingfisherINC: is it possible to match the two different timezones?

Jeroen.
 

UTC (to my understanding) is Greenwich Mean Time. Are you in eastern Europe or South Africa. This would cause the 2 hour difference.

Assuming you are in the US, the 2 hour time difference does not make sense. The time difference than should be 4 to 8 hours.

I am not sure what the CMS_AUDITTABLE is. Is this a home grown table? I would also check your regional settings. Make sure your timezone is consistent.
 
Hi JBaileys,

I'm in the Netherlands: 1 hour time difference standard and at this moment 1 hour dst.

Jeroen.
 
Do you have day light savings time in the Netherlands. I got a function from somebody (don't remember) so I can't give credit, but it calculates the time (central zone) in the USA. You could model after this logic.

Function (DateTimeVar gmtDateTime)
//This function converts any GMT date-time to a Local date-time after
//checking whether the date is during Daylight Saving Time or not.

NumberVar i;
DateVar searchDate;
DateVar beginDST;
DateVar endDST;
NumberVar timeDiff;
DateTimeVar localDateTime;

//Find the DST begin date (which is always the first Sunday in April)
//for the year of the "gmtDateTime" argument.
For i := 1 To 30 Do
(
searchDate := Date(Year(gmtDateTime), 04, i);
If (DayOfWeek(searchDate) = 1) then Exit For
);
beginDST := searchDate;

//Find the DST end date (which is always the last Sunday in October)
//for the year of the "gmtDateTime" argument.
For i := 31 To 1 Step -1 Do
(
searchDate := Date(Year(gmtDateTime), 10, i);
If (DayOfWeek (searchDate) = 1) then Exit For
);
endDST := searchDate;

//The difference between GMT and U.S. Central time zone is 5 hours during
//DST or 6 hours if not.
If gmtDateTime in beginDST to endDST then timeDiff := 5 else timeDiff := 6;

//Now convert GMT to Local
localDateTime := DateAdd ("h", -timeDiff, gmtDateTime)
 
@ cmmrfrds:

thanks! I solved my problem by a little tabel with the start date and end date of the DST for the next 10 years, but your suggestion is a lot nicer! (exept that the startingdate over here is the last sunday of march, but that is a easy adjustment)

Jeroen.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top