Get actual time for specific time zone

Dear experts,
is it possible to get the actual time for a given time zone? We need to know the time of a certain plant and we are searching for a standard function module which calculates the time based on the plants time zone.
Thanks in advance,
David
Edited by: David Claes on Apr 12, 2010 5:05 PM

You can use TIME ZONE statement for this.
DATA: time_stamp_s TYPE string,
            time_stamp     TYPE timestamp,
            tzone              TYPE timezone,
           wf_date_conv TYPE sy-datum,
           wf_time_conv TYPE sy-uzeit.
tzone = 'CET'.
CONCATENATE sy-datlo   "Local Date
                          sy-timlo    "Local Time
                  INTO time_stamp_s.
time_stamp = time_stamp_s.
CONVERT TIME STAMP time_stamp TIME ZONE tzone INTO DATE wf_date_conv TIME wf_time_conv.
Otherwise FM IB_CONVERT_INTO_TIMESTAMP/IB_CONVERT_FROM_TIMESTAMP can bne used for same.
Edited by: Satyajit on Apr 13, 2010 1:31 PM

Similar Messages

  • How to get Machine time zone in Powerbuilder?

    Do we have any way to get machine time zone in Powerbuilder script?
    Thanks in advance.

    Hello,
    Use the GetTimeZoneInformation API:
    FUNCTION ulong GetTimeZoneInformation(ref str_timezoneinformation str) LIBRARY "Kernel32.dll" alias for "GetTimeZoneInformation"
    Obviously, you need to create the structure argument of type str_timezoneinformation
    For your convenience, below the exported structure:
    global type str_time_zone_information from structure
    long bias
    string standardname
    str_systemtime standarddate
    long standardbias
    string daylightname
    str_systemtime daylightdate
    long daylightbias
    end type
    global type str_systemtime from structure
    unsignedinteger wYear
    unsignedinteger wMonth
    unsignedinteger wDayOfWeek
    unsignedinteger wDay
    unsignedinteger wHour
    unsignedinteger wMinute
    unsignedinteger wSecond
    unsignedinteger wMilliseconds
    end typ
    See GetTimeZoneInformation function (Windows)
    HTH,
    Jacob

  • Getting the time zone support right

    When I take an international trip I can never seem to get this right, and calendar events go slip-sliding all over the place.
    I have tried by time zone support on and off, but still previous events seem to get displayed wrong no matter what I do.
    Currently I'm in Tokyo. Next Friday I'm going to St. Louis for a couple of months. I have a customer call on June 6th at 10 am central time. I just added it to my calendar by entering "Call with Coaches on June 6 at 10 am CDT" (see screenshot) and it created this event which correctly shows it taking place on June 7th Japan time. And I added a note about the actual time just in case.
    So how should I have it set so when I am in St. Louis it shows up as June 6 at 10 am?
    And what will happen with all my other events where I typically don't specify a time zone?
    Thanks,
    Doug

    Hey Doug Lerner2,
    Thanks for the question and superb details. I can understand how confusing Time Zone support can sometimes be. In my experience, everything is going to relate back to the main Time Zone Support drop down menu at the top left of the Calendar. This is the easiest way to quickly switch the Time Zone you are viewing.
    Once you travel to St. Louis, simply switch the time zone of your calendar (if it had not automatically switched) to see all of your events in the local time zone (including events that don’t specify a time zone). So if you had your event set for June 6th at 10am CST, once you switch the Time Zone to central time you’ll see that that event is displayed correctly. All of your events that were created in Japan will move to their respective times, and you can also have “Floating” events that will ignore the time zone, and always be at that set time.
    For more information, see these resources:
    Calendar: View all your events in a different time zone
    http://support.apple.com/kb/PH11534
    Calendar: Change an event’s time zone
    http://support.apple.com/kb/PH11531
    Thanks,
    Matt M.

  • How get current time zone offset ?

    Hi,
    I am facing to a problem related getting time zone offset.
    Below code is used for my application :
    NSDate* sourceDate = [NSDate date];
    NSTimeZone* destinationTimeZone = [NSTimeZone systemTimeZone];
    timeZoneOffset = [destinationTimeZone secondsFromGMTForDate:sourceDate] / 3600;
    But sometimes seems that above code is getting work wrong. For example :
    Knoxville, TN : time zone offset should be -5. But my code resulted it as -4.
    http://www.timeanddate.com/worldclock/city.html?n=843
    This web is related my issue. Here is :
    Standard time zone: UTC/GMT -5 hours
    Daylight saving time: +1 hour
    Current time zone offset: UTC/GMT -4 hours
    Actually I don't know how get to "Daylight saving time:".
    Can you correct this issue for me ?
    Please advice.
    Thanks.

    Hi Raiden -
    RaidenMAC wrote:
    Knoxville, TN : time zone offset should be -5. But my code resulted it as -4.
    I think your code is giving you the correct offset for Knoxville on today's date. The offset for Eastern Standard Time (EST) is -5, but Knoxville is currently on Eastern Daylight Time (EDT), which is one hour later than EST. (-5) + 1 => (-4), which is what your code computed.
    Note that [secondsFromGMTForDate:|http://developer.apple.com/library/ios/documentation/Co coa/Reference/Foundation/Classes/NSTimeZoneClass/Reference/Reference.html#//appleref/doc/uid/20000190-CACDIAIC] is correcting for daylight savings time. That's why you need to pass the date to that method. If you pass a "summer" date, the return offset will be one hour more than it will be for a "winter" date (usually early November to mid March). For example, try moving the date forward 60 days like this:
    NSDate *sourceDate = [NSDate dateWithTimeIntervalSinceNow:3600 * 24 * 60];
    NSTimeZone* destinationTimeZone = [NSTimeZone systemTimeZone];
    int timeZoneOffset = [destinationTimeZone secondsFromGMTForDate:sourceDate] / 3600;
    NSLog(@"sourceDate=%@ timeZoneOffset=%d", sourceDate, timeZoneOffset);
    The above should give you the offset for Knoxville on Dec. 7, 2010, which is a winter date.
    Actually I don't know how get to "Daylight saving time:".
    You can test a NSTimeZone object with [isDaylightSavingTimeForDate:|http://developer.apple.com/library/ios/documentat ion/Cocoa/Reference/Foundation/Classes/NSTimeZoneClass/Reference/Reference.html#//appleref/doc/uid/20000190-CHDCJGHE], but you don't need that information when you obtain the offset with secondsFromGMTForDate:.
    - Ray

  • HOW TO GET ACTUAL DATE FOR A DATE TYPE ITEM

    Hi
    We want to get actual date(today) automatically to the date type item on our form page. I should be able to change it also.
    thank you very much for help
    ömer faruk akyüzlü
    in Turkey

    hi ömer faruk akyüzlü,
    Make the Source Type as PL/SQL Expression or Function
    and in the Source Value or Expression
    enter SYSDATE Make the item as the date picker of the format whatever u want.
    hope this helps u better.
    bye
    Srikavi.

  • Get column value for specific columns

    I want to change the default behavior of a IKM. In a specific step, I need to call a PLSQL procedure inside the loop below, and that procedure will substitute the insert clause. The procedure uses only some attributes, and I need to check the name of each one when I use the getColList method.
         for aRecord in myCursor loop
              insert into      <%=snpRef.getTable("L","TARG_NAME","A")%>
                   <%=snpRef.getColList("", "[COL_NAME]", ",\n\t\t\t", "", "((INS AND (NOT TRG)) AND REW)")%>
                   <%=snpRef.getColList(",", "[COL_NAME]", ",\n\t\t\t", "", "((INS AND TRG) AND REW)")%>
              values
                   <%=snpRef.getColList("", "aRecord.[COL_NAME]", ", \n\t\t\t", "", "((INS AND (NOT TRG)) AND REW)")%>
                   <%=snpRef.getColList(",", "aRecord.[COL_NAME]", ", \n\t\t\t", "", "((INS AND TRG) AND REW)")%>
         end loop;
    For example, to call the procedure I do that: schema.proc_1(col1, col2, col3). However, I have more than 3 columns, and I need to restrict them when I use the getColList method. I would like to know if there is a way to get only specific columns, giving these names. I pass the name of the column, and the method should return its value. Can I use the getColList to do that? Is there any other way to do that?

    Hi Luciene,
    You can use the UD flags to do this. If you click on one of your mappings in the Diagram tab of your interface you will notice several UD flags (UD1 to UD5) you can use those to flag the columns you want to use in proc_1.
    To summarize:
    - at the interface level flag the columns you want to use in your PL/SQL code -> check UD1 for all of them
    - modify your IKM code:
    <%=odiRef.getColList(",", "COL_NAME", ",\n\t\t\t", "", "((INS AND TRG) AND REW AND UD1)")%> <- retrieve columns flagged with insert, not read only, mapped on target and with UD1 flagged. The "AND UD1" part can be used in other getColList.
    Hope this helps.
    Thanks,
    Julien

  • SCOM Powershell get alert count for specific groups

    Hello good people,
    im looking for a powershell script (to use in powershell widget):
    ive got 3 groups which generate alerts, for example group1 group2 group3
    now i need to get all new alerts and closed alerts per group
    groupid  new  closed
    group1    12     100
    group2    10       50
    group3    3         6
    thx for your help in advanced

    you may consider using the following powershell cmdlet to count number of closed alert
    $gp1closed=get-scommonitoringobject|where-object{$_.displayname -eq 'group1'} | get-scomalert | whereobject$_.resolutionstate -eq '255'} |measure
    $gp1open=get-scommonitoringobject|where-object{$_.displayname -eq 'group1'} | get-scomalert | whereobject$_.resolutionstate -eq '0'} |measure
    $gp2closed=get-scommonitoringobject|where-object{$_.displayname -eq 'group2'} | get-scomalert | whereobject$_.resolutionstate -eq '255'} |measure
    $gp2open=get-scommonitoringobject|where-object{$_.displayname -eq 'group2'} | get-scomalert | whereobject$_.resolutionstate -eq '0'} |measure
    $gp3closed=get-scommonitoringobject|where-object{$_.displayname -eq 'group3'} | get-scomalert | whereobject$_.resolutionstate -eq '255'} |measure
    $gp3open=get-scommonitoringobject|where-object{$_.displayname -eq 'group3'} | get-scomalert | whereobject$_.resolutionstate -eq '0'} |measure
    'Group1' + '  '+ $gp1open + '  '+ $gp1closed
    'Group2' + '  '+ $gp2open + '  '+ $gp2closed
    'Group3' + '  '+ $gp3open + '  '+ $gp3closed
    Roger

  • Get Navigation Nodes for specific Role

    Hi, after reading and doing Prakash Singh's weblog on creating a portal sitemap:
    Create a SITEMAP for your portal
    I want it to do more. After implementing it I saw that it loaded every role I have, which is exactly what it should do.  But I want to be able to specify the role, maybe as an iView property, and only load the roles specified if the user has access.  I am new to java programming and I can't figure out how to change the code to do this. Any help is appreciated. Will reward points. Thanks in advance.
    Peter

    Hi Peter,
    In the doProcessBeforeOutput() method, Prakash gets all the initial nodes. Then, for each one he calls getRestofNodes().
    Instead, in the doProcessBeforeOutput() method, just get a single role. Something like this:
    //GET PROPERTY
    String roleFilter = request.getComponentContext().getProfile().getProperty("myRole");
    //IF NO ROLE IS SPECIFIED GET ALL ROLES
    if (roleFilter == null || roleFilter.equals("") ) {
       .... do what Prakash does
    //IF ROLE IS SPECIFIED GET THIS ROLE
    else {
       try {
          INavigationService navigationservice = (INavigationService)PortalRuntime.getRuntimeResources().getService("com.sap.portal.navigation.service.navigation");
          INavigationNode myRole = navigationservice.getNode(getEnvironment(request), roleFilter);
          //COPY PRAKASH'S CODE FOR RENDERING ROLE
          //    (instead of rootNode variable use myRole)
          String title =  myRole.getTitle(Locale.ENGLISH);
          Tree tree = new Tree(title, "");
          tree.setRootNodeIsVisible(true);
          GridLayoutCell cell = new GridLayoutCell(myRole.getName());
          String text = "" + title + "";
          TreeNode root = new TreeNode(myRole.getName(), text);
          root.setEncode(false);
          root.setOpen(true);
          tree.setRootNode(root);
          getRestofNodes(myRole,root);
          cell.setVAlignment(CellVAlign.TOP);
          cell.setContent(tree);
          gl.addCell(1, 1, cell);
       catch (Exception e) {}
    Add a property for the component in the portalapp.xml, like this:
    Hope this helps.
    Daniel

  • Get time zone abbreviations

    How to get current time zone abbreviations from oracle?
    Why “select EXTRACT(timezone_abbr FROM current_timestamp) TA
    FROM dual;” Qury returns a ‘UNK’?

    To have a valid timezone abbreviation you need to set a time_zone :
    SQL> select current_timestamp from dual;
    CURRENT_TIMESTAMP
    12/03/07 14:28:10,566726 +01:00
    SQL> select EXTRACT(timezone_abbr FROM current_timestamp) TA
      2  FROM dual;
    TA
    UNK
    SQL> alter session set time_zone = 'cet';
    Session altered.
    SQL> select current_timestamp from dual;
    CURRENT_TIMESTAMP
    12/03/07 14:28:23,702305 CET
    SQL> select EXTRACT(timezone_abbr FROM current_timestamp) TA
      2  FROM dual;
    TA
    CET
    SQL> Nicolas.

  • Time Zone Abbreviations Internationalized in Java?

    I'm trying to fgure out if anyone knows if Java provides time zone abbreviations (specifically) internationalized. We have a third party library that we are using to retrieve the abbreviated time zone display for the current locale (France). We get the correct time zone returned, "CEST" (Central European Summer Time), but as I understand it "CEST" is the english translation of that time zone and the French version is "HAEC" which stands for "heure d'été d'Europe centrale".
    After debugging through that library it appears its just getting the Time Zone display from Java's rt.jar. After looking inside there at the TimeZoneNames_fr.java this is what I am seeing (keep in mind some of this is speculation)
    String[] arrayOfString15 = { "Heure d'Europe centrale", "CET", "Heure d'été d'Europe centrale", "CEST" };
    To me this looks like Java can return the internationalized version of the full time zone name, but we are going to get the english translation of the abbreviation.
    Would anyone be able to confirm this for me?
    Here is a test I mocked up:
    TimeZone tz = TimeZone.getTimeZone("Europe/Paris");
    System.out.println("Time Zone (Long English): " + tz.getDisplayName(true, 1));
    System.out.println("Time Zone (Short English): " + tz.getDisplayName(true, 0)); // Actual Code in third party library
    System.out.println("Time Zone (Long French): " + tz.getDisplayName(true, 1, Locale.FRANCE));
    System.out.println("Time Zone (Short French): " + tz.getDisplayName(true, 0, Locale.FRANCE));
    and the results:
    Time Zone (Long English): Central European Summer Time
    Time Zone (Short English): CEST
    Time Zone (Long French): Heure d'été d'Europe centrale
    Time Zone (Short French): CEST
    I ran also ran the same code snippet using the ICU4J 4.6.1 locale SPI provider and here's the output.
    Time Zone (Long English): Central European Summer Time
    Time Zone (Short English): CEST
    Time Zone (Long French): heure avancée d’Europe centrale
    Time Zone (Short French): HAEC

    Double post: http://forum.java.sun.com/post!reply.jspa?messageID=3826011

  • Time zone adjustments and smart album filters

    I just returned from a photo safari in Southeast Asia and while there I had my cameras set to the correct local time (GMT+7). Upon importing to Aperture I set both Camera Time and Actual TIme to the right place and chugged ahead. Now when I look at an actual image file's info the time is 'adjusted' for MST (my home time zone) but in Aperture the Meta Tooltips and Metadata show the GMT+7 time.
    Now I want to create Smart Albums with the photos from each day from my (two) cameras. I've tried using the Date and Calendar filters but they both seem to use the MST time rather than the appropriate 'local' time. If I add "GMT" to the Date filter is does filter by GMT but that's not the result I want either.
    Any hints on how to get this right?

    Neil,
    I've been struggling with similar issues to varying degrees for some time now. I have found it extremely frustrating in my attempts to adjust the date to reflect proper time zones and local times. The only time it seems to "get it right" is when I have my camera set to my local time zone, shoot in my local time zone and upload to my computer in my local time zone.
    This is all fine and dandy for when I am shooting locally, but the reality for any photographer is that you never shoot just locally. That said, I have sought help on this issue myself and wrung my head to try to find an answer.
    Thus far, I have come to one possible conclusion. It may have something to do with the way the computer's time zone is set in the system preferences. If you have the time zone set to "set time zone automatically using current location" this could throw things off. I am not certain about this, but I think it may have something to do with what is going on.
    In your case, you had set the camera to the proper time zone, and when you imported the images, you set the camera and actual time zones to the proper time. However, if you have the time zone setting to set automatically based on location and you didn't import (or upload) the images in that time zone, it may throw things off.
    For example, you set your camera for Cambodia time. You then import your images in New York. you set the camera time and the actual time to Cambodia time, but the computer time zone is set to New York EST. I think if you turn off (if you have it on in the first place) the automatic time zone setting, it may solve your problem. You may even have to set the time zone on your computer to the local time zone that you took the pictures in.
    Aperture is really vague about how to go about doing this. It seems like it should be really simple and straight forward, but for months I have been scratching my head trying to figure out what is going wrong. It got me all confused as to what the camera time means and what the actual time means, etc.
    Anyway, I am not sure if this is the answer that you are looking for. I am looking for answers myself, but rather than start my own thread, I thought I would chime in on yours to see if we can't get the ball rolling with some other users.
    Mac

  • Problem in converting the String to Date with time zone GMT

    Hi,
    When I tried to convert the string 12/05/2009 to Date, the time zone is set to BST.On the other hand, for the date 12/12/2009, the time zone is set to GMT. What should I do to get the time zone as GMT all the time.?
    SimpleDateFormat formatter = new SimpleDateFormat("dd/MM/yyyy");
    String dateString = "12/05/2009";
    System.out.println(myDate.toString());

    I think you are all missing the point. java.util.Date objects always alway always store the date as the number of milliseconds since 1/1/1970 UTC so the only TimeZone they have its the implicit UTC. When you use the Date.toString() method the toString() method gets the default time zone from your environment and formats the data accordingly. This means that the same Date object will, by default, produce a different result for France and Australia and the US.
    So, if you have the date "12/5/2009" as a String then to convert it to a java.util.Date you must specify what TimeZone is implied. If it is your system time zone then you can just create a SimpleDateFormat object with the correct format and then use the parse() method to create the java.util.Date object and this will automatically be converted to UTC. If the date String represents some other time zone then you must explicitly set the time zone of the SimpleDateFormat object before parsing the string.
    The same approach applies when converting a java.util.Date object to a String. If you want anything other than your system time zone then you must explicitly tell the SimpleDateFormat what time zone you want the result formatted for.

  • Enhancement Pack 4: Time Zone Soft Error

    We are testing Enhancement Pack 4 in ECC 6.0. We have a few ship-to customer numbers that we use where we use the same cusomer number but update the address from order to order.
    When we udpate the Region in the sales order to a region that is not in the current time zone, we get a "Time Zone EST (or whatever time zone is there) is not valid in country US (several possibilities)" soft error. This is not happening in Production or in any of our other test clients; only the client that we are testing Enhancement Pack 4 in.
    We've searched config and can't find anything that may be causing this. We've also seen references to note 1505591 that would make this warning go away, but this note appears to be being reworked and is not available.
    Does anyone have any suggestions? Thank you!

    Execute STZGC in both the clients and compare whether the Time Zone EST is maintained for country US.
    thanks
    G. Lakshmipathi

  • Time Zones. can someone explain?

    in the Manual, Aperture refers to the time zones as:
    Choose the time zone of the shoot location from the Camera Time Zone pop-up menu.
    Choose the time zone of the computer’s location from the Actual Time Zone pop-up menu.
    what does this give us? the image's date at the location or the image's date at home (where the computer is)? (something to add to the next Aperture manual?)
    and as others have indicated, how would you change the date by minutes rather than hours if for example the clock on the camera was off by a few minutes? even changing hours is difficult to work out. (a new feature for the next Aperture update?)
    a basic problem however is that Aperture will not change the date embedded in the original raw file. I understand and agree with their golden rule that raw files be untouched by Aperture, but I think dates should be editable (absolute; date, time, year, month, day, hour, minute; and relative modes; add/subtract days/time), even if double confirmation dialogs are required.

    I travel all over the world so the way I use this is I allways set my cameras to GMT then put the time offset from the location I did the shoot. That way I don't ever have to remember to reset cameras for daylight saving or time zone.

  • ICal ichanges the time of the events with another time zone when sync

    I've changed my time zone in my iphone during a trip and when I came back, I reset my actual time zone, then, I syncronized it with my lap and they show different times for the same event.
    Events added directly in my iphone stay the same in it, but appear in another time in my computer, even though I have verified both of them have the same time zone. 
    Events added directly on my lap stay the same in it but appear wrong in my iphone.
    Thanks,

    Perhaps the answer in this thread will help:
    https://discussions.apple.com/message/7950396#7950396
    Understanding and Using Time Zone Support:
    http://support.apple.com/kb/HT4504

Maybe you are looking for

  • Can we replace oc4j 9.0.2 in 9iAS 9.0.2 infrastructure with oc4j 9.0.3 ?

    Hi all, We want to use OC4J 9.0.3 because of it support of JMS and new J2EE features. We want to use the complete 9ias 9.0.2 EE (which is infrastructure) because the OID and SSO support. I know the NOTE ** NOTE: OC4J Standalone is purely for standalo

  • I don't have a bookmark.plist in Library

    Today I switched from mobile.me to iCloud and now I realize that my bookmarks changed back to a configuration I had weeks ago. So I go look for the bookmarks.plist in my Library to do whatever it takes - actually I am looking in yesterday's Timeline

  • Game froze my MacBook Pro, now I have internet problems-What should I do?

    Hi, I recently bought a game to play on my macbook pro, it is Sims Castaway Stories for Mac by Aspyr. My laptop meets/exceeds the requirements to play it.  It only uses little ram and hardrive space. I installed it a few days ago, my laptop started t

  • Regarding Printing Problem

    Dear Abaper's   I  am having  problem in check Priniting  program. Tcode is FCHN. Now Vendor name is not apperning on cheque. After  own spool Request the cheque data must appear. How will I get Script Name of the  printing Program. I have check in T

  • Missing episode - killing series 2

    Hi I've just watched the first three episodes of the killing season two and I notice that episode four is missing. Thanks C