<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: how convert OFFSET to TIMEZONE ? in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/how-convert-offset-to-timezone/m-p/1488484#M227567</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;can u check this which is written in method GET_LOCAL_TIMEZONE of class      CL_BCOM_MIME_MESSAGE_SMTP&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;CALL FUNCTION 'TZON_GET_OFFSET'
    EXPORTING
      if_timezone   = l_tzone
      if_local_date = me-&amp;gt;date
      if_local_time = me-&amp;gt;time
    IMPORTING
      ef_utcdiff    = l_utcdiff
      ef_utcsign    = l_utcsign.

* determine hours and minutes
  l_tzone_hours   = l_utcdiff(2).
  l_tzone_minutes = l_utcdiff+2(2).

* determine comment
  CONCATENATE '(' sy-zonlo ')' INTO l_tzone_comment_s.

* concatenate timezone string
  CONCATENATE l_utcsign l_tzone_hours l_tzone_minutes
         INTO timezone_string.

  timezone = timezone_string.

  CONCATENATE timezone_string l_tzone_comment_s
         INTO timezone_string SEPARATED BY space.&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Tue, 08 Aug 2006 12:42:38 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2006-08-08T12:42:38Z</dc:date>
    <item>
      <title>how convert OFFSET to TIMEZONE ?</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/how-convert-offset-to-timezone/m-p/1488483#M227566</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello all,&lt;/P&gt;&lt;P&gt;Just want to ask a TimeZone question.&lt;/P&gt;&lt;P&gt;Already found a FM "TZON_GET_OFFSET", which convert a Timezone to OFFSET. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;But vice versa i don't have any idea . &lt;/P&gt;&lt;P&gt;who can tell me, how convert a OFFSET to TIMEZONE?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thx in advance!&lt;/P&gt;&lt;P&gt;best regards &lt;/P&gt;&lt;P&gt;Yaning&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 08 Aug 2006 12:26:55 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/how-convert-offset-to-timezone/m-p/1488483#M227566</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-08-08T12:26:55Z</dc:date>
    </item>
    <item>
      <title>Re: how convert OFFSET to TIMEZONE ?</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/how-convert-offset-to-timezone/m-p/1488484#M227567</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;can u check this which is written in method GET_LOCAL_TIMEZONE of class      CL_BCOM_MIME_MESSAGE_SMTP&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;CALL FUNCTION 'TZON_GET_OFFSET'
    EXPORTING
      if_timezone   = l_tzone
      if_local_date = me-&amp;gt;date
      if_local_time = me-&amp;gt;time
    IMPORTING
      ef_utcdiff    = l_utcdiff
      ef_utcsign    = l_utcsign.

* determine hours and minutes
  l_tzone_hours   = l_utcdiff(2).
  l_tzone_minutes = l_utcdiff+2(2).

* determine comment
  CONCATENATE '(' sy-zonlo ')' INTO l_tzone_comment_s.

* concatenate timezone string
  CONCATENATE l_utcsign l_tzone_hours l_tzone_minutes
         INTO timezone_string.

  timezone = timezone_string.

  CONCATENATE timezone_string l_tzone_comment_s
         INTO timezone_string SEPARATED BY space.&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 08 Aug 2006 12:42:38 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/how-convert-offset-to-timezone/m-p/1488484#M227567</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-08-08T12:42:38Z</dc:date>
    </item>
    <item>
      <title>Re: how convert OFFSET to TIMEZONE ?</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/how-convert-offset-to-timezone/m-p/1488485#M227568</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The belowsaid example would help you,&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;
The best way to measure the runtime of a specific program segment is to calculate the difference between the relative runtimes before and after the segment.



DATA: T1 TYPE I, 
T2 TYPE I,
T TYPE P DECIMALS 2, 
N TYPE I VALUE 1000.

T = 0.
DO N TIMES.
  GET RUN TIME FIELD T1.

*****************************
* Code to be tested *
*****************************

  GET RUN TIME FIELD T2.
  T2 = T2 - T1.
  T = T + T2 / N.
ENDDO.

WRITE: / 'Mean Runtime: ', T, 'microseconds'.

This example shows a DO loop that is constructed around a program segment to be tested. In this example, the program segment is just a comment. The difference of the relative runtimes after (T2) and before (T1) the program segment is measured N times. The mean value (T) is calculated from the results. The output might look as follows:

Mean Runtime:            23,40 microseconds

The output shows the offset time that results from the runtime measurement itself. This offset must be subtracted from the runtime of a real program segment.

If you replace the comment block in the program with the simple assignment

T = T.

the result might be:

Mean Runtime:            28,84 microseconds

This shows that the runtime of a simple assignment (without type conversion) is about 5 microseconds. If you assign T to a field of type C, the runtime is increased by a factor of about four due to the type conversion.&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;lt;b&amp;gt;&amp;lt;i&amp;gt;Reward if helpful.&amp;lt;/i&amp;gt;&amp;lt;/b&amp;gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 08 Aug 2006 12:49:34 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/how-convert-offset-to-timezone/m-p/1488485#M227568</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-08-08T12:49:34Z</dc:date>
    </item>
    <item>
      <title>Re: how convert OFFSET to TIMEZONE ?</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/how-convert-offset-to-timezone/m-p/1488486#M227569</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;hello ,&lt;/P&gt;&lt;P&gt;Thanks for your antwort!&lt;/P&gt;&lt;P&gt;but i mean that, Given: OFFSET '&lt;EM&gt;0200' or '&lt;/EM&gt;0545' ..&lt;/P&gt;&lt;P&gt;                 Result:TimeZone e.g 'CET' or 'NEPAL'&lt;/P&gt;&lt;P&gt;are there so FM, which convert OFFSET to TIMEZONE?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;regards&lt;/P&gt;&lt;P&gt;Yaning&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 08 Aug 2006 13:22:13 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/how-convert-offset-to-timezone/m-p/1488486#M227569</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-08-08T13:22:13Z</dc:date>
    </item>
    <item>
      <title>Re: how convert OFFSET to TIMEZONE ?</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/how-convert-offset-to-timezone/m-p/1488487#M227570</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello ,&lt;/P&gt;&lt;P&gt;for normal Timezone this is easy.&lt;/P&gt;&lt;P&gt;e.g '&lt;EM&gt;0200'---&amp;gt;'UTC&lt;/EM&gt;2'&lt;/P&gt;&lt;P&gt;but for '+0545' the Timezone is special 'NEPAL'.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;therefore i meet the Problem, how convert the '+0545' to right TIMEZONE 'NEPAL'?  &lt;/P&gt;&lt;P&gt;I wanna find a FM, or a special method. &lt;/P&gt;&lt;P&gt;wer can help me!&lt;/P&gt;&lt;P&gt;Thx&lt;/P&gt;&lt;P&gt;regards&lt;/P&gt;&lt;P&gt;Yaning&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 08 Aug 2006 13:28:28 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/how-convert-offset-to-timezone/m-p/1488487#M227570</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-08-08T13:28:28Z</dc:date>
    </item>
  </channel>
</rss>

