Unexpected result when parsing a datetime using sap.ui.core.format.DateFormat

I am parsing datetime values in order to use them in an makit Chart.
My x axis is a time axis with values in the JavaScript datetime format like 1408177125000.
I wondered about a time shift in my axis and see the following result:
console.log(Date(fValue) ): Thu Aug 28 2014 18:01:44 GMT+0200 (Mitteleuropäische Sommerzeit)
console.log(oDateFormat.format(new Date(fValue))): 16.08.2014 11:23:33
The date in line 01 is correct, the second one (16.8.) is not correct.
I tried to simulate this behaviour in jsbin but there line 02 only states an error!?
http://jsbin.com/sodetoyoqaba/1/edit?html,js,console
I have no clue what is going wrong here. Any ideas?
P.S. My app is running in SAP HCP Trial with sap.ui.version 1.22.6 while on jsbin it is version 1.22.7
P.P.S When hitting the code manually in the jsbin console then I also get the wrong date 16.08.2014 there. So you can see the behaviour also there.

That pretty much makes sense (although ignoring things is not very kind) 
Good thing: Question is answered.
Bad thing: The converted date is not what I expected from my datasource :-( At least I know where to search further now .
Thanks,
Mark

Similar Messages

  • Colors in JTable - unexpected result when scrolling

    Hi Guys,
    Looks like I'm having a problem with a JTable.
    I have a list of items and they are distinguished by 2 colors (so the end-user can differentiate between them). Anyway, the table colors work ok but when using a JScrollbar the table receives an unexpected result � few of the first items (which are not identical) share the same color.
    anyone?
    Example of an output (Gil will be colored Green, Dan Yellow, James Green�and so forth)
    Gil
    Gil
    Gil
    Dan
    Dan
    Dan
    James
    James
    James
    James
    my code looks like this (I'll appritiate if someone can point out where I can have the html tags to display it correctly)
    aTable = new JTable(dataModel)
    public Component prepareRenderer(TableCellRenderer r, int row, int col)
    Component c = super.prepareRenderer(r, row, col);
    Color bg = Color.YELLOW;
    String[] valuesRaw = (String[]) model.elementAt(row);
    if (changeRround)
    name1=valuesRaw[0];
    changeRround=false;
    name2=valuesRaw[0];
    if (!name1.equals(name2))
    this.switchColor(bg,c);
    changeRround=true;
    return c;
    public void switchColor(Color bg, Component c)
    if (colorSwitcher%2==0)
    bg = new Color(221, 250, 207);
    c.setBackground(bg);
    c.setForeground(Color.BLACK);
    else
    bg = new Color(253, 252, 193);
    c.setBackground(bg);
    c.setForeground(Color.BLACK);
    colorSwitcher++;
    }

    I'm getting there...
            aTable = new JTable(dataModel)
                public Component prepareRenderer(TableCellRenderer r, int row, int col)
                     Component c = super.prepareRenderer(r, row, col);
                     Color bg = Color.YELLOW;         
                     String[] valuesRaw = (String[]) model.elementAt(row);         
                     if (changeRround)
                         name1=valuesRaw[0];
                         changeRround=false;
                         name2=valuesRaw[0];
                     if (name1.equals(name2))
                     else
                         this.switchColor(bg,c);                    
                         changeRround=true;
                     return c;
                 public void switchColor(Color bg, Component c)
                    if (colorSwitcher%2==0)
                        bg = new Color(221, 250, 207);
                        c.setBackground(bg);
                        c.setForeground(Color.BLACK);
                    else
                        bg = new Color(253, 252, 193);
                        c.setBackground(bg);
                        c.setForeground(Color.BLACK);
                    colorSwitcher++;
                }

  • Unexpected results, when creating a pdf from Illustrator (cs3)

    A customer has supplied a 'print ready' pdf, created in Illustrator [cs3]. The file contains grey text [20% black], but when they have printed to pdf [using acrobat 8], the breakdown of the 'grey' changes in colour to a cmyk value [45,36,35,1) instead of 0,0,0,20 as originally created in Illustrator.
    I've replicated the customers error from scratch, and have found that, when you save [save-as] the file as a pdf [using acrobat 8 settings] and resulting pdf is correct = 20% black.
    These errors where generated using a pc platform. We also tried to reproduce the error on our Mac's, but the Mac system didn't generate any issues.
    Does anyone know why illustrator would produce [using the same native file] two different results when producing pdf's? We've check all colour management, etc. and still can't figure out why this is happening.

    I have heard of this issue, but trying to remember is an issue by itself. lol. Seams to me there is an option for true blacks 0,0,0,? and cmy blacks ?,?,?,0. I am almost positive there are a few threads on this forum about this.

  • 'Change your password' error when log to designer using SAP Authentication

    Hi All,
    Here is the scenario. I want to create a universe on BW.
    1. I try to log into designer using SAP authentication (by choosing SAP as the authentication option)
    2. In the system name its the name of the CMS
    3. The username and password that I entered were for my SAP system. (Yes, my SAP role is already present in CMC)
    4. After I entered, I got a message saying ' You must change your password to continue. If you do not change your password, your account might get disabled'.
    5. I am prompted with dialogue box to change my password.
    6. After I enter a new password (fairly complicated), it gives an error Failed to change password/ Details : [repo_proxy 15]. Sessionfacade:: changePassword - User password has not been updated (Incorrect password).
    I know that's not the case because I am able to log into SAP GUI and into CMC using my SAP credentials.
    Any advice please ? Why is this happening in designer ?

    Hi,
    Your issue may be fixed in FP1.8 with the following reference:
    ADAPT01229385
    Description:
    +If an Enterprise alias is created for a SAP user accounts in the Central Management Console (CMC), and set to change their+
    +passwords at the next log on, the SAP users may be unable to log on to applications with their SAP credentials.+
    +This problem happens even after the Enterprise alias is removed from the SAP user accounts in the CMC.+
    I hope this helps.
    regards,
    Henry

  • Unexpected result when using Ls -L

    I'm no code warrior, and I'm studying the ATS book Mac OSX Support Essentials.
    When I type Ls -L, I get a list of the folders/directories in the home folder but not the info that the CLI returns for the book.
    Typing Ls -Le returns the exact same result as typing Ls -L.
    I've tried both multiple times.
    This discrepancy is really not helping me understand, and I MUST pass this exam. If I can't even get past chap 3, I'm dead.
    Any help will be greatly appreciated.
    DLS

    I get a list of Folders in a table format:
    test-installs-macbook-pro:~ testinstall$ Ls -L
    Desktop Movies Send Registration
    Documents Music Sites
    Downloads Pictures
    Library Public
    In the Book it returns a list format with the item type and permissions followed by number of subitems, owner, assigned group, modification date and the item's name.
    The format in the book looks like this:
    drwx----------+ 5 owner staff 170 Aug 20 15:49 Desktop
    drwx----------+ 3 owner staff 102 Aug 20 01:08 Documents
    I don't get this so I hit a brick wall for the rest of the lesson which builds upon this.
    Thanks for your help
    DLS
    Message was edited by: MacDLS

  • Unexpected result when saving image of front panel in EXE

    Below code is used to save an image of the front panel of a VI. The front panel shows an XY graph with two plots.
    This works perfectly in the development environement. With the EXE, the plots of the graph (only the plots) are invisible.
    Have you already encountered this unexpected behaviour ? Many thanks for any advice.
    Solved!
    Go to Solution.

    JB,
    A few things may be messing you up. 
    When you build the EXE, the path that is created for the "Current Vi's Path" probably won't be where you want it.  I would use "Application Directory" or "Default Data Directory".  These path things have messed me up a few times when creating a EXE.
    Also is the data on your graph being generated before you are running the section of code in your picture?  I assume it is since you state that it is working in the development environment.
    What version of LV are you using?
    Joe

  • How to ignore white space when parse xml document using xerces 2.4.0

    When I run the program with the xml given below the following error comes.
    Problem parsing the file.java.lang.NullPointerExceptionjava.lang.NullPointerExce
    ption
    at SchemaTest.main(SchemaTest.java:25)
    ============================================================
    My expectation is "RECEIPT". Pls send me the solution.
    import org.apache.xerces.parsers.DOMParser;
    import org.xml.sax.InputSource;
    import java.io.*;
    import org.xml.sax.ErrorHandler;
    import org.w3c.dom.*;
    public class SchemaTest {
    public static void main (String args[])
    try
    FileInputStream is = new FileInputStream(new File("C:\\ADL\\imsmanifest.xml"));
    InputSource in = new InputSource(is);
    DOMParser parser = new DOMParser();
    //parser.setFeature("http://xml.org/sax/features/validation", false);
    //parser.setProperty("http://apache.org/xml/properties/schema/external-noNamespaceSchemaLocation", "memory.xsd");
    //ErrorHandler errors = new ErrorHandler();
    //parser.setErrorHandler(errors);
    parser.parse(in);
    Document manifest = parser.getDocument();
    manifest.normalize();
    NodeList nl = manifest.getElementsByTagName("organization");
    System.out.println((((nl.item(0)).getChildNodes()).item(0)).getFirstChild().getNodeValue());
    catch (Exception e)
    System.out.print("Problem parsing the file."+e.toString());
    e.printStackTrace();
    <?xml version = '1.0'?>
    <organizations default="detail">
    <organization identifier="detail" isvisible="true">
    <title>RECEIPT</title>
    <item identifier="S100000" identifierref="R100000" isvisible="true">
    <title>Basic Module</title>
    <item identifier="S100001" identifierref="R100001" isvisible="true">
    <title>Objectives</title>
    <metadata/>
    </item>
    </item>
    <metadata/>
    </organization>
    </organizations>
    Is there a white space problem? How do I get rid from this problem.

    ok now i really wrote the whole code, a bit scrolling in the API is to hard?
                DocumentBuilderFactory dbf = new DocumentBuilderFactory();
                DocumentBuilder db = dbf.newDocumentBuilder();
                dbf.setNamespaceAware(true); //or set false
                Document d = db.parse(inputstream);

  • Unexpected ClassCastException when looking up Home using JNDI

    J2EE Gurus,
    In the attached sample program, a EJB (named MyScheduler in package mytest) is
    used to install a java code dynamically in weblogic service (8.1sp1), as well
    as to invoke a test java code (MyTest.run()) in it using Java reflection. Another
    EJB (named MyEJB in package myejb) is deployed dynamically using Weblogic console
    with its client side packaged with dynamically deployed java code. When invoked
    through MyScheduler, MyTest.run() simply looks up the home of MyEJB using JNDI,
    and when it is cast to MyEJBHome, a ClassCastException is thrown.
    Can someone explain why this exception occurs? Does this mean that a (dynamically)
    deployed code (java or EJB) cannot call other (dynamically) deployed EJBs, even
    when it has the client side of EJB packaged with it?
    Any help will be deeply appreciated.
    Thanks,
    Abhay
    [testjava.jar]

    "Nick" <[email protected]> wrote in message news:40343200$[email protected]..
    Because returned instance implements javax.sql.DataSource.Ha ha.
    No kidding :-)No. One could have found it himself by printing out returned type class
    or just by going to google and typing XADataSource weblogic +ClassCastException...
    Why would you want to do it? weblogic takes care of all the XA
    connection pooling, resource enlistments etc.Yeah, true.
    I should know this - I just got a little confused ... :-)
    I have just come from doing all the XA stuff myself... and got used to having
    XADataSources around...Thanks to J2EE, there is no need for low level plumbing when transaction
    support is needed.
    Also, with JMS resources, you DO have to have the XAQueueConnection etc etc for
    XA - even in an appserver.Per my knowledge weblogic allows you creating XA-aware JMS resources.
    Regards,
    Slava Imeshev
    >
    Thanks.
    "Slava Imeshev" <[email protected]> wrote:
    "Nick" <[email protected]> wrote in message news:403121e2$[email protected]..
    I am getting a ClassCast exception when I lookup a "Global Transaction"enabled
    JDBC DataSource.
    XADataSource xads = (XADataSource) ctx.lookup("jdbc/MyDS");
    Why is this?Because returned instance implements javax.sql.DataSource.
    How do I configure an XADataSource in JNDI?Why would you want to do it? weblogic takes care of all the XA connection
    pooling, resource enlistments etc.
    Regards,
    Slava Imeshev

  • Why does the cell style index returning wrong CellFormat value when parsing excel cells using OpenXml SDK?

    Consider a General format cell having a value of 39.95. When I fetch the CellFormat of the cell it returns wrong cell format-
    CellFormat thisCellFormat = ((CellFormat)cellFmts.ChildElements[(int)thisCell.StyleIndex.Value]);
    int fmtId = Convert.ToInt32(thisCellFormat.FormatId.Value);
    The value of fmtId returned is 1, and in some cases 38, where it should be 2 or 39.
    This issue is only for General format cells, I am getting correct id for Number format cells.
    Below is the
    Standard ECMA-376 Office Open XML File Formats specified set of implied cell formats for reference-
    ID Format Code
    0 General
    1 0
    2 0.00
    3 #,##0
    4 #,##0.00
    9 0%
    10 0.00%
    11 0.00E+00
    12 # ?/?
    13 # ??/??
    14 mm-dd-yy
    15 d-mmm-yy
    16 d-mmm
    17 mmm-yy
    18 h:mm AM/PM
    19 h:mm:ss AM/PM
    20 h:mm
    21 h:mm:ss
    22 m/d/yy h:mm
    37 #,##0 ;(#,##0)
    38 #,##0 ;Red
    39 #,##0.00;(#,##0.00)
    40 #,##0.00;Red
    45 mm:ss
    46 [h]:mm:ss
    47 mmss.0
    48 ##0.0E+0
    49 @

    The purpose of this forum is to support the Open Specifications documentation. You can read about the Microsoft Open Specifications program here,
    http://www.microsoft.com/openspecifications/en/us/default.aspx
    The library of Open Specification documents is located here,
    http://msdn.microsoft.com/en-us/library/dd208104.aspx
    It doesn’t appear that you are implementing one of the protocols cited.  Your question may be more applicable to MSDN's Microsoft Office for Developers/Open XML Format SDK forum at
    https://social.msdn.microsoft.com/Forums/office/en-US/home?forum=oxmlsdk
    Bryan S. Burgin Senior Escalation Engineer Microsoft Protocol Open Specifications Team

  • Smartform font spacing Issue when using SAP printer name

    Hi Friends,
    I am facing some spacing issues when printing a form using SAP printer name. If I use LOCL then the output comes perfectly but when I use the SAP printer name the space between characters are getting widened and so the alignment of each column goes wayward. I suspect it could be due to the device type but not sure which seeting controls this. There is a similar problem in the logo as well. When using LOCL the logo comes out good but when using the printer name the quality is not good and becomes pixelised. Have any of you faced similar issues? Can you provide some guidance or pointers for the solution.
    Device type of LOCL : ZSAPWIN
    Device type of SAP printer name :  ZHPLJ5
    CPI is defined in smartform as 10.
    Please let me know if you need more information.
    Thanks,
    Praveen

    Hi,
    This problem occurs because the printer driver for both the printers are different,
    I suggest you use Local printer only or configure any other printer with printer diver in SAP as SAPWIN.
    Regards,
    Bharat.

  • Parse xs:dateTime String as Date

    Hi all,
    I have to parse a xs:dateTime String (such as "2005-10-27T16:18:06.421+02:00") into Date. I have tested the next piece of code:
    String timeString="2005-10-27T16:18:06.421+02:00";
    DateFormat dateFormat = new SimpleDateFormat("'-'?yyyy'-'MM'-'dd'T'HH':'mm':'ss('.'S+)?(zzzzzz)?");
    Date date = dateFormat.parse(timeString);but it throws the following exception:
    java.text.ParseException: Unparseable date: "2005-10-27T16:18:
    06.421+02:00"
    at java.text.DateFormat.parse(Unknown Source)
    Could anybody be so kind as to tell me how getting a Date from a dateTime string, please?
    Thank you very much in advance.

    First of all, thank you very much for your request.
    It has been very useful.
    When getting a dateTime using:
    String
    timeString="2005-10-27T16:18:06.421+02:00";
    DateFormat dateFormat = new
    SimpleDateFormat("yyyy-MM-dd'T'HH:mm:ss.SSSZ");I obtain the following, as you have written:
    "2005-10-27T16:18:06.421+0200"
    However, this is not compliant with dateTime defined
    in XMLSchema (http://www.w3.org/TR/xmlschema-2/),
    because the time zone does not contain ":". Is there
    any way of getting a date-time compliant with
    xs:dateTime? if not, should java consider it?
    Thank you very much in advance.I do not know much about XMLSchema but I will take your word for the date/time definition - as far as I can see there is no time zone in SimpleDateFormat that complies with this format exactly.
    You could create the string by adding the ':' or parse it by removing the ':' as in my example; but, I do not see a way to do this directly.
    You might want to search to see if there is a bug report out there or maybe some other discussion on this topic.

  • Use SAP XML toolkit

    Hi Frnds,
    I am working on migartion project SAP BC to PI7.1,we are reusing many XSLT Mapppings in PI7.1 from SAP BC.but when tesing XSL its giving error,when i select Use SAP XML toolkit  option its working fine with warning messages.I read help.sap.com documentation SAP using using Use SAP XML toolkit  option not a betetr design.
    Why my XSLT not working when i tested without Use SAP XML toolkit  option.
    what are thing i need to chnage in XSL.
    error message when i dont select Use SAP XML toolkit*  option
    TransfromerException during XSLT processing:
    javax.xml.transform.TransformerException: com.sun.org.apache.xalan.internal.xsltc.TransletException: com.sun.org.apache.xalan.internal.xsltc.TransletException: java.io.FileNotFoundException
    if i select option iam getting warning message but my XSL working fine.
    help me on this issue.
    Regards,
    Raja Sekhar

    Hi Stefan,
    I am uisng Use SAP XML toolkit*  option now for time besing as per sap doc its not a good idea to use.
    my question is why its not working without Use SAP XML toolkit*  option.
    if i want to make my XSL work without this option Use SAP XML toolkit,what are the things i need to chnage in my XSL.
    Regards,
    Raj

  • How to use SAP XI to get Inspection Lot IDOC when Insp. lot is created

    I want to create a 3rd party .NET app that gets an Inspection Lot IDOC when an inspection lot is created, gather the inspection results, then push the results back to SAP in an IDOC. How do I use SAP XI to do that? I developed an HTTP listener .NET app and configured a sender communications channel for the SAP System and a receiver connunications channel for the HTTP adapter in the XI integration scenario, but how do I configure the XI integration scenario to send my app an IDOC when an inspection lot is created, and what IDOCs do I use?
    Thanks,

    Hi Ed
    I think you can use
    IDOC TYPES : QALITY01, QALITY02
    in XI you can create
    IDOC to HTTP as a scenario
    IDOC need to be triggered from SAP system and you can import the IDOC metadata into XI from SAP
    Check this thread it will help
    Re: IDOC to HTTP
    Thanks
    Gaurav

  • HT1199 Two new programmes loaded from different companies fail when I try to use them -quit unexpectedly messages

    Two new programmes from differant companies have loaded ok but when I try to use them I get an imediate error message -quit unexpectedly- and the programme closes. What is wrong? 

    Launch the Console application in any of the following ways:
    ☞ Enter the first few letters of its name into a Spotlight search. Select it in the results (it should be at the top.)
    ☞ In the Finder, select Go ▹ Utilities from the menu bar, or press the key combination shift-command-U. The application is in the folder that opens.
    ☞ Open LaunchPad. Click Utilities, then Console in the icon grid.
    Step 1
    Make sure the title of the Console window is All Messages. If it isn't, select All Messages from the SYSTEM LOG QUERIES menu on the left. If you don't see that menu, select
    View ▹ Show Log List
    from the menu bar.
    Enter the name of the crashed application or process in the Filter text field. Select the messages from the time of the last crash, if any. Copy them to the Clipboard by pressing the key combination command-C. Paste into a reply to this message (command-V).
    When posting a log extract, be selective. In most cases, a few dozen lines are more than enough.
    Please do not indiscriminately dump thousands of lines from the log into this discussion.
    Important: Some private information, such as your name, may appear in the log. Anonymize before posting.
    Step 2
    In the Console window, look under User Diagnostic Reports (not "Diagnostic and Usage Messages") for crash reports related to the crashed process. The report name starts with the name of the process, and ends with ".crash". Select the most recent report and post the entire contents — again, the text, not a screenshot. In the interest of privacy, I suggest that, before posting, you edit out the “Anonymous UUID,” a long string of letters, numbers, and dashes in the header of the report, if it’s present (it may not be.) Please don’t post other kinds of diagnostic report — they're very long and not helpful.

  • I'm having trouble with something that redirects Google search results when I use Firefox on my PC. It's called the 'going on earth' virus. Do you have a fix that could rectify the vulnerability in your software?

    I'm having trouble with a virus or something which affects Google search results when I use Firefox on my PC ...
    When I search a topic gives me pages of links as normal, but when I click on a link, the page is hijacked to a site called 'www.goingonearth.com' ...
    I've done a separate search and found that other users are affected, but there doesn't seem to be a clear-cut solution ... (Norton, McAfee and Kaspersky don't seem to be able to detect/fix it).
    I'd like to continue using the Firefox/Google combination (nb: the hijack virus also affects IE but not Safari) - do you have a patch/fix that could rectify the vulnerability in your software?
    thanks

    ''' "... vulnerability in your software?" ''' <br />
    And it affects IE, too? Ya probably picked up some malware and you blame it on Firefox.
    Install, update, and run these programs in this order. They are listed in order of efficacy.<br />'''''(Not all programs detect the same Malware, so you may need to run them all to solve your problem.)''''' <br />These programs are all free for personal use, but some have limited functionality in the "free mode" - but those are features you really don't need to find and remove the problem that you have.<br />
    ''Note: If your Malware infection is bad enough and you are mis-directed to URL's other than what is posted, you may have to use a different PC to download these programs and use a USB stick to transfer them to the afflicted PC.''
    Malwarebytes' Anti-Malware - [http://www.malwarebytes.org/mbam.php] <br />
    SuperAntispyware - [http://www.superantispyware.com/] <br />
    AdAware - [http://www.lavasoftusa.com/software/adaware/] <br />
    Spybot Search & Destroy - [http://www.safer-networking.org/en/index.html] <br />
    Windows Defender: Home Page - [http://www.microsoft.com/windows/products/winfamily/defender/default.mspx]<br />
    Also, if you have a search engine re-direct problem, see this:<br />
    http://deletemalware.blogspot.com/2010/02/remove-google-redirect-virus.html
    If these don't find it or can't clear it, post in one of these forums for specialized malware removal help: <br />
    [http://www.spywarewarrior.com/index.php] <br />
    [http://forum.aumha.org/] <br />
    [http://www.spywareinfoforum.com/] <br />
    [http://bleepingcomputer.com]

Maybe you are looking for

  • Issue with MacBook Pro Display

    My buddy has a 13" Macbook Pro unibody and recently whenever he puts it to sleep and then goes to open the screen again the backlight for the keyboard comes on but the display does not show up. In order to fix it he has to close the lid and then open

  • Where are photo file names?

    I've "titled" many, many photos in iPhoto by changing the filename (e.g. "DSC_2254" --> "On vacation in Hawaii"), but there appears to be no option in Photos to show the filename. So none of my "titles" appear. Am I missing something?

  • Object is not an instance of declaring class

    Hi All, I am having an issue with reflection invoking a method. I have looked up the error I am getting but cannot see why my code is throwing it. As I understand it, the error thinks I am invoking a method on the wrong instance of an expected object

  • Audition CS5.5 fade out glitch

    Hello, I am experiencing a very frustrating glitch with Audition's fade out effect.  Occasionally when I apply a fade out to a clip it will have a sudden spike in volume at the very end of the fade out.  This happens in the audio preview as well as t

  • Iphone will not sync past step 2

    my iphone will not get past step 2 when i sync it to itunes. using windows 8. what's up?