#133657 - 03/17/06 12:01 AM
RESOLVED: Converting Date Field to Char Field
|
newbie
Registered: 08/18/05
Posts: 48
|
** The problem ended up being two-fold: 1. The Locale TimeZone setting was blank on the AR User tool. I changed it to the appropriate value of GMT+0:00 2. The getentry program on our server was also not using the correct DST setting. I have tested everything and the user is happy that the dates are consistent across the application. Many thanks (especially Thomas) for your help. Mike. Michael Worts Remedy Specialist IGS, Business Consulting Services ITIL Manager Certified Tel: +44 (0)1483 875273 Mob: +44 (0)7801 755346 Internet: michael.worts@uk.ibm.com Thomas Bean Sent by: "Action Request System discussion list(ARSList)"
15/03/2006 18:58 Please respond to arslist
To arslist@ARSLIST.ORG cc Subject Re: Converting Date Field to Char Field
** Mike, One other question came to mind concerning your arGetEntry API call -- are you viewing the results of this API action via the standard Remedy User client running on Windows, or are you viewing the output directly on the server? If you are viewing it from a Windows client, then it could still be the same issue of the client's time zone/dst settings not matching that of the server. I would suggest looking at both the server and client settings to make sure they are in sync. --Thomas ----- Original Message ----- From: Thomas Bean Newsgroups: gmane.comp.crm.arsystem.general Sent: Tuesday, March 14, 2006 14:10 Subject: Re: Converting Date Field to Char Field
** Mike, I'm not familiar enough with Remedy API programming to be able to give you an answer on that one. It would make sense to me that the program generating the API call would use the server's TZ setting if it is running on the server, but I would guess that the program might also be able to define its own environment (rather than using the server defaults). I'm not sure whether centralized User Preferences would have any effect on an external API call, but I wouldn't rule that out either. --Thomas ----- Original Message ----- From: Michael Worts Newsgroups: gmane.comp.crm.arsystem.general Sent: Tuesday, March 14, 2006 1:28 PM Subject: Re: Converting Date Field to Char Field
** Thomas,
Thanks for the explanation. One quick question - I have an arGetEntry API which is displaying a similar behaviour and it runs on the server. Should I be looking at the TZ variable set on the server (AIX 5.3)?
Thanks,
Mike.
Michael Worts Remedy Specialist IGS, Business Consulting Services ITIL Manager Certified Tel: +44 (0)1483 875273 Mob: +44 (0)7801 755346 Internet: michael.worts@uk.ibm.com
Thomas Bean Sent by: "Action Request System discussion list(ARSList)"
14/03/2006 18:37
Please respond to arslist
To arslist@ARSLIST.ORG cc Subject Re: Converting Date Field to Char Field
** Mike, Remedy uses the server time zone and daylight saving time settings when it sets the value in the character field. If your server is configured with the correct time zone setting and DST rules, then the problem is not the server. The server is simply compensating for a perceived offset in the date/time value submitted by the client. For example, if I uncheck the "Automatically adjust clock for daylight saving changes" setting in my Windows date and time properties (on the client), restart Remedy User and perform the same test you described (using a date after the US DST change on April 2), this is what I get: Date/Time Value: 4/3/2006 12:00:00 AM Character Value: 04/03/2006 01:00:00 These two values represent the same exact time, only the Date/Time value is displayed in standard time (the client configuration), while the Character value is displayed in Daylight Saving Time (the server configuration). If your user has nothing set in the locale settings under Tools > Options, then the problem is almost definitely in the Windows date and time properties. I would guess that either she does not have the automatic DST adjustment setting turned on, or else Windows is using the US DST change rules instead of the EU rules (EU Summertime starts March 26, US DST starts April 2). From http://webexhibits.org/daylightsaving/b.html :
Daylight Saving Time begins for most of the United States at 2:00 a.m. on the first Sunday of April. Time reverts to standard time at 2:00 a.m. on the last Sunday of October. In the U.S., each time zone switches at a different time.
In the European Union, Summer Time begins and ends at 1:00 a.m. Universal Time (Greenwich Mean Time). It begins the last Sunday in March and ends the last Sunday in October. In the EU, all time zones change at the same moment.
To make things even more complicated, the US DST rules are changing next year, so that DST will begin on the second Sunday of March and end the first Sunday of November.
--Thomas
----- Original Message ----- From: Michael Worts Newsgroups: gmane.comp.crm.arsystem.general Sent: Tuesday, March 14, 2006 11:51 AM Subject: Re: Converting Date Field to Char Field
** For some reason, I have this mental block when it comes to Remedy date/time formatting. I do not think there is enough documentation on how to use OS variables, database variables, and client variables in Remedy. They all seem to have an effect on the end result.
I know there are some settings under Tools->Options, there is also the Windows Time Zone settings under the Control Panel. I also have a TZ variable set on my UNIX box as well as Oracle DATE settings on the database. So the question is, which one does Remedy use?
At the moment, the user has nothing set in the locale settings on her client. I will check it out tomorrow and have a good look. I have a feeling that the problem is at server level as I am using a Filter to do the Set Fields.
Will keep you informed.
Mike.
Michael Worts Remedy Specialist IGS, Business Consulting Services ITIL Manager Certified Tel: +44 (0)1483 875273 Mob: +44 (0)7801 755346 Internet: michael.worts@uk.ibm.com
Thomas Bean Sent by: "Action Request System discussion list(ARSList)"
14/03/2006 16:45
Please respond to arslist
To arslist@ARSLIST.ORG cc Subject Re: Converting Date Field to Char Field
** Michael, The client's time zone settings (or user preferences) affect the display of the values in the date/time fields. You may be encountering inconsistent results between the date/time field and the character field if your client time zone settings do not match that of the server. What are the time zone/daylight saving time settings on your client? Any time zone settings in your user preferences?
--Thomas
----- Original Message ----- From: Michael Worts Newsgroups: gmane.comp.crm.arsystem.general Sent: Tuesday, March 14, 2006 5:23 AM Subject: Converting Date Field to Char Field
** Hello everyone,
This is something that I have never noticed before.
I have a test form with 2 fields - Date/Time and Character.
I have one filter which On Modify, does a Set Fields from Date/Time into Character. This is where it goes wrong .....
Date/Time Value Character Value 14/3/2006 00:00:00 Tue, 14 Mar 2006 ,00:00:00 <- this is ok 27/3/2006 00:00:00 Mon, 27 Mar 2006 ,01:00:00 <- this is 1 hour out
Can anyone tell me why the Character Field is not saving the date value correctly? It obviously has something to do with Daylight Savings but I am not sure why it is only going wrong during the conversion to a CHAR field. This is the SQL output:
UPDATE T967 SET C536870913=1143417600,C536870914='Mon, 27 Mar 2006 ,01:00:00',C5='Michael Worts',C6=1142333843 WHERE C1 = '000000000000001' AND C6 <= 1142333832
Environment:
AR Server 6.3 Patch 13 AIX 5.2 (TZ=GMT0BST,M3.5.0,M10.5.0) Oracle 9i AR User 5.1.2 Patch 1303
I have also tried it on this and had the same problem:
AR Server 5.1.2 Patch 1375 AIX 5.3 Oracle 9i AR User 5.1.2 Patch 1303
Note: Something weird. I just tried it on my 6.3 client and it worked ok, although when I viewed the record on the 5.1.2 client it displayed an hour behind. (e.g. entered "29/03/2006 00:00:00" via 6.3 client and it shows as "28/3/2006 23:00:00" on the 5.1.2 client.
I am getting rather confused!
Many thanks,
Michael.
Michael Worts Remedy Specialist IGS, Business Consulting Services ITIL Manager Certified Tel: +44 (0)1483 875273 Mob: +44 (0)7801 755346 Internet: michael.worts@uk.ibm.com 20060125This posting was submitted with HTML in it 20060125This posting was submitted with HTML in it 20060125This posting was submitted with HTML in it 20060125This posting was submitted with HTML in it 20060125This posting was submitted with HTML in it
20060125This posting was submitted with HTML in it 20060125This posting was submitted with HTML in it 20060125This posting was submitted with HTML in it
|
|
Top
|
|
|
|
|
#133658 - 03/18/06 11:02 AM
Re: RESOLVED: Converting Date Field to Char Field
[Re: towndrowm]
|
enthusiast
Registered: 09/15/04
Posts: 313
|
** Mike, Just out of curiosity, did you check the Windows time zone and DST settings on the client before you changed the locale setting in AR User? If the time zone setting was blank in the user preferences under Tools > Options, then it was the Windows time zone/DST settings that were causing the problem. I don't believe the user preferences have a setting for DST, so your user may have to manually change the TimeZone setting again after March 26th from GMT+0:00 to GMT+1:00 to compensate for the time change. This is why I think it's usually preferable to use the Windows system date/time settings if possible, rather than changing the time zone in the user preferences. --Thomas ----- Original Message ----- From: Michael Worts Newsgroups: gmane.comp.crm.arsystem.general Sent: Friday, March 17, 2006 06:01 Subject: RESOLVED: Converting Date Field to Char Field
** The problem ended up being two-fold: 1. The Locale TimeZone setting was blank on the AR User tool. I changed it to the appropriate value of GMT+0:00 2. The getentry program on our server was also not using the correct DST setting. I have tested everything and the user is happy that the dates are consistent across the application. Many thanks (especially Thomas) for your help. Mike. Michael Worts Remedy Specialist IGS, Business Consulting Services ITIL Manager Certified Tel: +44 (0)1483 875273 Mob: +44 (0)7801 755346 Internet: michael.worts@uk.ibm.com Thomas Bean Sent by: "Action Request System discussion list(ARSList)"
15/03/2006 18:58 Please respond to arslist
To arslist@ARSLIST.ORG cc Subject Re: Converting Date Field to Char Field
** Mike, One other question came to mind concerning your arGetEntry API call -- are you viewing the results of this API action via the standard Remedy User client running on Windows, or are you viewing the output directly on the server? If you are viewing it from a Windows client, then it could still be the same issue of the client's time zone/dst settings not matching that of the server. I would suggest looking at both the server and client settings to make sure they are in sync. --Thomas ----- Original Message ----- From: Thomas Bean Newsgroups: gmane.comp.crm.arsystem.general Sent: Tuesday, March 14, 2006 14:10 Subject: Re: Converting Date Field to Char Field ** Mike, I'm not familiar enough with Remedy API programming to be able to give you an answer on that one. It would make sense to me that the program generating the API call would use the server's TZ setting if it is running on the server, but I would guess that the program might also be able to define its own environment (rather than using the server defaults). I'm not sure whether centralized User Preferences would have any effect on an external API call, but I wouldn't rule that out either. --Thomas ----- Original Message ----- From: Michael Worts Newsgroups: gmane.comp.crm.arsystem.general Sent: Tuesday, March 14, 2006 1:28 PM Subject: Re: Converting Date Field to Char Field ** Thomas, Thanks for the explanation. One quick question - I have an arGetEntry API which is displaying a similar behaviour and it runs on the server. Should I be looking at the TZ variable set on the server (AIX 5.3)? Thanks, Mike. Michael Worts Remedy Specialist IGS, Business Consulting Services ITIL Manager Certified Tel: +44 (0)1483 875273 Mob: +44 (0)7801 755346 Internet: michael.worts@uk.ibm.com Thomas Bean Sent by: "Action Request System discussion list(ARSList)"
14/03/2006 18:37
Please respond to arslist
To arslist@ARSLIST.ORG cc Subject Re: Converting Date Field to Char Field
** Mike, Remedy uses the server time zone and daylight saving time settings when it sets the value in the character field. If your server is configured with the correct time zone setting and DST rules, then the problem is not the server. The server is simply compensating for a perceived offset in the date/time value submitted by the client. For example, if I uncheck the "Automatically adjust clock for daylight saving changes" setting in my Windows date and time properties (on the client), restart Remedy User and perform the same test you described (using a date after the US DST change on April 2), this is what I get: Date/Time Value: 4/3/2006 12:00:00 AM Character Value: 04/03/2006 01:00:00 These two values represent the same exact time, only the Date/Time value is displayed in standard time (the client configuration), while the Character value is displayed in Daylight Saving Time (the server configuration). If your user has nothing set in the locale settings under Tools > Options, then the problem is almost definitely in the Windows date and time properties. I would guess that either she does not have the automatic DST adjustment setting turned on, or else Windows is using the US DST change rules instead of the EU rules (EU Summertime starts March 26, US DST starts April 2). From http://webexhibits.org/daylightsaving/b.html :
Daylight Saving Time begins for most of the United States at 2:00 a.m. on the first Sunday of April. Time reverts to standard time at 2:00 a.m. on the last Sunday of October. In the U.S., each time zone switches at a different time.
In the European Union, Summer Time begins and ends at 1:00 a.m. Universal Time (Greenwich Mean Time). It begins the last Sunday in March and ends the last Sunday in October. In the EU, all time zones change at the same moment.
To make things even more complicated, the US DST rules are changing next year, so that DST will begin on the second Sunday of March and end the first Sunday of November.
--Thomas
----- Original Message ----- From: Michael Worts Newsgroups: gmane.comp.crm.arsystem.general Sent: Tuesday, March 14, 2006 11:51 AM Subject: Re: Converting Date Field to Char Field ** For some reason, I have this mental block when it comes to Remedy date/time formatting. I do not think there is enough documentation on how to use OS variables, database variables, and client variables in Remedy. They all seem to have an effect on the end result. I know there are some settings under Tools->Options, there is also the Windows Time Zone settings under the Control Panel. I also have a TZ variable set on my UNIX box as well as Oracle DATE settings on the database. So the question is, which one does Remedy use? At the moment, the user has nothing set in the locale settings on her client. I will check it out tomorrow and have a good look. I have a feeling that the problem is at server level as I am using a Filter to do the Set Fields. Will keep you informed. Mike. Michael Worts Remedy Specialist IGS, Business Consulting Services ITIL Manager Certified Tel: +44 (0)1483 875273 Mob: +44 (0)7801 755346 Internet: michael.worts@uk.ibm.com Thomas Bean Sent by: "Action Request System discussion list(ARSList)"
14/03/2006 16:45
Please respond to arslist
To arslist@ARSLIST.ORG cc Subject Re: Converting Date Field to Char Field
** Michael, The client's time zone settings (or user preferences) affect the display of the values in the date/time fields. You may be encountering inconsistent results between the date/time field and the character field if your client time zone settings do not match that of the server. What are the time zone/daylight saving time settings on your client? Any time zone settings in your user preferences? --Thomas ----- Original Message ----- From: Michael Worts Newsgroups: gmane.comp.crm.arsystem.general Sent: Tuesday, March 14, 2006 5:23 AM Subject: Converting Date Field to Char Field ** Hello everyone, This is something that I have never noticed before. I have a test form with 2 fields - Date/Time and Character. I have one filter which On Modify, does a Set Fields from Date/Time into Character. This is where it goes wrong ..... Date/Time Value Character Value 14/3/2006 00:00:00 Tue, 14 Mar 2006 ,00:00:00 <- this is ok 27/3/2006 00:00:00 Mon, 27 Mar 2006 ,01:00:00 <- this is 1 hour out Can anyone tell me why the Character Field is not saving the date value correctly? It obviously has something to do with Daylight Savings but I am not sure why it is only going wrong during the conversion to a CHAR field. This is the SQL output: UPDATE T967 SET C536870913=1143417600,C536870914='Mon, 27 Mar 2006 ,01:00:00',C5='Michael Worts',C6=1142333843 WHERE C1 = '000000000000001' AND C6 <= 1142333832 Environment: AR Server 6.3 Patch 13 AIX 5.2 (TZ=GMT0BST,M3.5.0,M10.5.0) Oracle 9i AR User 5.1.2 Patch 1303 I have also tried it on this and had the same problem: AR Server 5.1.2 Patch 1375 AIX 5.3 Oracle 9i AR User 5.1.2 Patch 1303 Note: Something weird. I just tried it on my 6.3 client and it worked ok, although when I viewed the record on the 5.1.2 client it displayed an hour behind. (e.g. entered "29/03/2006 00:00:00" via 6.3 client and it shows as "28/3/2006 23:00:00" on the 5.1.2 client. I am getting rather confused! Many thanks, Michael. Michael Worts Remedy Specialist IGS, Business Consulting Services ITIL Manager Certified Tel: +44 (0)1483 875273 Mob: +44 (0)7801 755346 Internet: michael.worts@uk.ibm.com 20060125This posting was submitted with HTML in it 20060125This posting was submitted with HTML in it 20060125This posting was submitted with HTML in it 20060125This posting was submitted with HTML in it 20060125This posting was submitted with HTML in it
20060125This posting was submitted with HTML in it 20060125This posting was submitted with HTML in it 20060125This posting was submitted with HTML in it
20060125This posting was submitted with HTML in it
|
|
Top
|
|
|
|
|
|
|