One caveat that I just noticed -- this method of calculating the time zone will 
only work for time zones with a negative offset from GMT (i.e., west of the 
Prime Meridian and east of the International Date Line).  For time zones with a 
positive offset from GMT, the date value of "1/1/1970 12:00:00 AM" would 
represent a time prior to the epoch.  When I tested the process with a client 
time zone setting of GMT +8 hours, the integer field was set to a value of "1", 
which is not accurate.  To overcome this limitation, here is an alternate 
method that should work for any time zone:

  1.. Set a date/time field to the value "01/02/1970 12:00:00 AM" (That's 
January 2nd, *not* February 1st, for those outside the U.S.) ;-)
  2.. Set an integer field to the value in the date/time field.
  3.. Subtract 86400 (the number of seconds in one day) from the value in the 
integer field.
  4.. Divide the value in the integer field by -3600 (I recommend setting the 
resulting value to a decimal field, since not all time zones are offset from 
GMT by a whole number of hours).


Here are a couple examples that I tested:

Client Time Zone:  (GMT -06:00) Central Time (US & Canada)
  a.. 1/2/1970 12:00:00 AM = integer value of 108000 seconds
  b.. 108000 - 86400 = 21600 seconds
  c.. 21600 / -3600 = -6 hours

Client Time Zone:  (GMT +08:00) Perth
  a.. 1/2/1970 12:00:00 AM = integer value of 57600 seconds
  b.. 57600 - 86400 = -28800 seconds
  c.. -28800 / -3600 = +8 hours



--Thomas

  ----- Original Message ----- 
  From: Thomas Bean 
  Newsgroups: gmane.comp.crm.arsystem.general
  To: arslist@ARSLIST.ORG 
  Sent: Friday, May 02, 2008 6:29 AM
  Subject: Re: Timezone info in date/time fields


  ** 
  One other note -- if the client and the AR Server are not in the same time 
zone, make sure these set fields actions are performed in an active link (NOT 
in a filter).

  --Thomas

    ----- Original Message ----- 
    From: Thomas Bean 
    Newsgroups: gmane.comp.crm.arsystem.general
    To: arslist@ARSLIST.ORG 
    Sent: Friday, May 02, 2008 1:00 PM
    Subject: Re: Timezone info in date/time fields


    ** 
    There is no display option to show the time zone of the client, but you can 
calculate this pretty easily.

      1.. Set a date/time field to the value "01/01/1970 12:00:00 AM". 
      2.. Set an integer field to the value of the date/time field.

    The result will be the number of seconds offset from GMT in the client's 
time zone (it will only equal zero if the client is in the GMT time zone).  You 
can divide this number by 3600 (the number of seconds in one hour) to get the 
number of hours offset from GMT.  If you want to translate that number to an 
actual time zone abbreviation, you could build a lookup form with all of the 
offset values for each time zone, and set the time zone abbreviation from the 
lookup form.

    Keep in mind, this would not account for seasonal daylight saving time 
adjustments.

    HTH,

    Thomas

      ----- Original Message ----- 
      From: PARIJ, Arkadi (Arkadi) 
      Newsgroups: gmane.comp.crm.arsystem.general
      To: arslist@ARSLIST.ORG 
      Sent: Thursday, May 01, 2008 8:30 PM
      Subject: Re: Timezone info in date/time fields


      ** 
      Hi Fred,

      Thanks for your reply.

      However, my question is more related to the display format of the 
date/time field and whether it is possible to include not only date and time 
information but timezone of the client as well.

       

      Regards,

       

      Arkadi 


--------------------------------------------------------------------------

      From: Action Request System discussion list(ARSList) [mailto:[EMAIL 
PROTECTED] On Behalf Of Grooms, Frederick W
      Sent: Thursday, May 01, 2008 11:17 PM
      To: arslist@ARSLIST.ORG
      Subject: Re: Timezone info in date/time fields

       

      No, because the date and time are displayed in the timezone of the person 
viewing the data.

       

      i.e.  A person viewing the diary data in New York would see (assuming a 5 
hour offset from your GMT examle ;)

              04/10/2008 9:36:20 AR_ESCALATOR

            A person in Chicago would see

              04/10/2008 8:36:20 AR_ESCALATOR


      Fred 

       


--------------------------------------------------------------------------

      From: Action Request System discussion list(ARSList) [mailto:[EMAIL 
PROTECTED] On Behalf Of Parij, Arkadi (Arkadi)
      Sent: Wednesday, April 30, 2008 6:27 PM
      To: arslist@ARSLIST.ORG
      Subject: Timezone info in date/time fields

      Hi All,

      Is there a way to configure WUT to set the date/time format to include 
the timezone information?

       

      For example, currently the timestamp and user name in a Diary field are 
displayed as follows:

      04/10/2008 14:36:20 AR_ESCALATOR

       

      The preferred format would be:

      04/10/2008 14:36:20 GMT AR_ESCALATOR

       

      Thanks.

       

      Arkadi 

       

      __Platinum Sponsor: www.rmsportal.com ARSlist: "Where the Answers Are" 
html___ __Platinum Sponsor: www.rmsportal.com ARSlist: "Where the Answers Are" 
html___
    __Platinum Sponsor: www.rmsportal.com ARSlist: "Where the Answers Are" 
html___ 
  __Platinum Sponsor: www.rmsportal.com ARSlist: "Where the Answers Are" html___

_______________________________________________________________________________
UNSUBSCRIBE or access ARSlist Archives at www.arslist.org
Platinum Sponsor: www.rmsportal.com ARSlist: "Where the Answers Are"

Reply via email to