WDDX (de)serializes dateTime with wrong DST rules?

2006-Aug-20 00:00 is being translated to 2006-Aug-19 23:00.  That date was in Pacific Daylight Time (-7) but the result seems to be -8 (PST).
I created a Web Service in Lotus Domino 7 and consume it in Coldfusion 8.  I've always returned data to Coldfusion as strings and thought I'd try passing a dateTime.  My Java code uses a kludge to get the ISO8601 date right:
("sb_" = java.lang.StringBuffer; "s__" = java.lang.String; "ca_" = java.util.Calendar)
df_SimpleWddx = new SimpleDateFormat( "yyyy-MM-dd'T'HH:mm:ssZ" );
s__Kludge = df_SimpleWddx.format( ca_Began.getTime() );
sb_Wddx.append( "<var name='dt_Began'><dateTime>" + s__Kludge.substring( 0, 22 ) + ":" + s__Kludge.substring( 22 ) + "</dateTime></var>" );
My Coldfusion code:
("dx_" = WDDX data; "st_" = Coldfusion structure)
<cfwddx action="wddx2cfml" input="#dx_BadDates#" output="st_BadDates" />
<cfdump var="#st_BadDates#" />
Seeing {ts '2006-08-19 23:00:00'} in <cfdump>, I changed my Java code to:
sb_Wddx.append( "<var name='dt_Began'><string>" + s__Kludge.substring( 0, 22 ) + ":" + s__Kludge.substring( 22 ) + "</string></var>" );
and got "2006-08-20T00:00:00-07:00" (which is correct).
Unless I'm totally lost, Domino (running JVM 1.4.2_11) is sending the date correctly but <cfwddx> isn't turning it into a dateTime correctly.  I'm running the Developer version of Coldfusion (on my local XP machine) and Coldfusion's JVM is 1.6.0_04.
Has anyone else fought this battle but won?

Why thank you, cfSearching - that was kind.  Sadly, I am far, far better at code than humor (and my code isn't stellar).
Paul, a friend showed me a workaround at cflib.org but mine was a little shorter:
Web Service side ("sb_" = java.lang.StringBuffer; "dt_" = java.util.Date)
df_Wddx = new java.text.SimpleDateFormat( "yyyy-MM-dd'T'HH:mm:ssZ" );
sb_WddxPacket.append( "<var name='s__Begins'> );
sb_WddxPacket.append( "     <string>" + df_Wddx.format( dt_Begins ) + "</string>" );
sb_WddxPacket.append( "</var>" );
return sb_WddxPacket.toString();
ColdFusion side ("st_" = Structure; "dt_" = DateTime)
<cfinvoke component      = "WebService"
          returnvariable = "st_WddxPacket"
          ... />
<cfset df_Wddx   = CreateObject( "java", "java.text.SimpleDateFormat" ) />
<cfset df_Wddx.applyPattern( "yyyy-MM-dd'T'HH:mm:ssZ" ) />
<cfset dt_Begins = df_Wddx.parse( st_WddxPacket.s__Begins ) />
It ignores the colon that's supposed to be in the timezone offset but, since Java is talking to Java, it's OK.
Thanks for submitting the bug for me!

Similar Messages

  • Has anyone verified jdk1.3.1_19 has the new DST rule as Sun advertizes?

    Hi Everyone,
    Has anyone verified that jdk1.3.1_19 does not actually have the new Daylight saving time rule mandated by Congress starting 2007 although Sun claims that it does? I tried jdk1.3.1_18 and jdk1.3.1_19. They do not have the new DST rule. I tried jdk1.4.1_11 and it has the new DST rule. Could anyone enlighten me about jdk1.3.1_18(19) if you know about the DST issue with these two JVM's? Thanks.
    Alan Lei

    We have legacy code running on legacy platforms that cannot be just retired unfortunately. It would be great if we could simply eliminate it overnight. The following is the code that I used to gauge whether the JVM has the new DST rule.
    int year = 2007;
    int month =10;
    int dateOfMonth = 1;
    int hour = 1;
    int minute = 0;
    GregorianCalendar gc = new GregorianCalendar(year, month, dateOfMonth, hour, minute);
    Date date = gc.getTime();
    System.out.println("displayed name=" + timeZone.getDisplayName() +
    " dst?=" + timeZone.useDaylightTime() +
    " date=" + date.toString() +
    " in dst?=" + timeZone.inDaylightTime(date));
    Alan Lei

  • Manual Bank Statement (One entry posted with wrong Posting Key)

    In The Manual Bank Statement, the user has posted one entry with wrong posting key, How can that be rectified? Or Is there anyway wherein the entire statement can be reversed?

    Hi,
    The standard document change rule will never allow to change the posting key irrespective of the transaction being used.
    You can use program RFEBKA96 to delete the statement so that you can post the same statement.
    If document generate with wrong posting key can be reversed through regular FB08
    Regards,
    Chintan Joshi

  • Iprocurement Requisition submission fails with Wrong Approval Hierarchy

    Hi,
    I am setting new AME Rules for Iprocurement Requisitions(Internal), and while submitting it shows an error saying 'Problem with Wrong Approval Hierarchy'.
    I had setup AME rules correctly, and all of a sudden its showin gme the error,
    I have checked my Requistion with the test Transaction and it shows correctly, but am not able to submit new Iproc requisitions.
    I have also taken the Setup Report for Internal Requisition Approval and it looks all fine.
    Had any one faced this kind of errors before ?
    Thanks,
    Kiran

    Hi,
    We believe Iprocurement does not support AME. Please get it confirmed from oracle support.
    Regards,
    S.P DASH

  • Webi base on BW query based on Infoset comes back with wrong values

    Hello:
    I have a Webi report on an OLAP Universe, on Bex Query.
    The bex query is based on 1 INFOSET.
    When I run the webi report the values that comes back a totally wrong values.
    The correct results are not brought back.
    When I do a test with crystal reports to the infoset, I can see the correct values.  (I'm aware crystal uses different drivers).
    The test is BW query designer, and crystal brings back proper values from Infoset based BW query.
    Webi on Infoset based BW Query comes back with wrong data.
    query is simple.
    Pull in 3 attributes, 3 key figures, where componentkey = "111"
    I get 36 rows in Crystal and 36 rows in Bex Analyzer, 36 rows in BW query designer (web analyzer).
    I get many rows in webi (almost like a CARTENSIAN product).
    I search a round this forum but still did not see a conclusive answer to this problem.
    But I see another thread that several others faced this same issue without a resolution.
    My environment.
    BOE XI 3.1 SP2
    No fix packs
    SAP IK 3.1 SP2
    HPUX-IA64
    Thanks in advance for any help.
    Dwayne

    Was this problem ever solved?
    I am having a similar problem with an infoset based query.
    I have created the BW infoset, and confirmed that the correct data is returned from the underlying infoproviders. A simple BW query on that infoset yields the same results.
    Create the universe, and then the WEBI, and WEBI now shows hundreds of records where I expect 10. Data is being returned in WEBI that definitely shouldn't be there. It's almost like the restrictions applied in the characteristic restriction area of my BW query are being ignored, even if I include them in the WEBI query.
    Cheers,
    Andrew

  • IPhoto imports photos with wrong dates even if the dates are fine on the camera

    Hi!
    When I import photos with iPhoto, sometimes it imports them with wrong dates, even the dates are fine on the camera. It puts dates such as 2032. Does anyone know how can I fix that. As far as I know there is no way to change dates of the photos.
    Thanks!

    well that is very confusing since if the date is correct on the camera it will be correct in iPhoto
    and as to
    As far as I know there is no way to change dates of the photos.
    Try looking through your iPhto menus - two commands - adjust time and date and batch change time and date - asjust is used to correct incorrect dates like a comera setting -   Batch change for missing dates like with scans
    LN

  • GR/IR expenses not affected with the settlement rule run process in the GL

    <i><b>Please neglect by previous post with the same title</b></i>
    There is a problem I face while running the settlement rule process related to internal orders on the GR/IR expenses.
    According to the internal order settlement rule every expense associated to an Internal order no. whether its an account payable or manual journal accounts it should be settled (distributed) on the cost centers specified in each internal order after the monthly settlement run process is done through T.Code "KO8G", and this actually happens on the entries that are booked manually through T.Code "FB50", but the GR/IR entries is the biggest problem, it didn't reflect the settlement rule distributions in the GL it just gives me the original transaction once its was automatically created through T.Code "MIGO" they are only allocated to a one profit center with no cost center and without being distributed to a multiple cost centers according to the distribution strategy.
    After a long search I found that the cost center distribution occurred only on a secondary none GL account named A&P Settlement (720010), all GR/IR expenses was settled correctly only on this account not through the ordinary GL accounts (e.g. Gifts, printed materials) and of course the correct distribution didn't appear in the GL,
    So is there a transaction or any way to allocate the GR/IR expenses to there correct cost centers with the correct cost element in the GL?
    Is there anything to do with the GR/IR calculation that depends on quantity base not value base?
    <i><b>The Process as follows:</b></i>
    (<b>1) Creating Internal order with a settlement rule (E.g. Cost center 1 (50%) Cost center 2 (50%)</b>
    <b>2) Creating a purchase order associated to an internal order</b>
    <b>3) The Goods received and creating the GR transaction T.Code "MIGO"</b>
    Acc/DR Expenses accounts
    Acc/CR GI/IR Account 400301
    Profit enter ###### (eg. 111177)
    Cost Center <blank>
    Internal order no. ####### (e.g. 9810512)
    <b>
    4) Closing the GR/IR accounts when receiving the invoice T.Code "MIRO"</b>
    <b>When we receive vendor invoice:</b>
    Acc/Dr GI/IR Account 400301
    Acc/Cr Vendor Account
    Profit enter ###### (eg. 111177)
    Cost Center <blank>
    Internal order no. ####### (e.g. 9810512)
    <b>5) Performing the Internal order settlement rule run process</b>
    <b>(N.B.</b> By entering the report of the cost center (Actual/Plan/ Variance) T.Code S_ALR_87013611
    I found that GR/IR expenses was not charged on the concerned cost centers as shown in the GL <b>)</b>
    <b>Your Reply is highly appreciated</b>

    Thanks for your kind reply,
    But is there a way solve this problem?
    And what is the use of leaving a field in the account assignment tab for an internal order while creating a PO and it will not take advantage of the settlement rule????????
    And as you know the internal order settlement is a way to create a multiple account assignment
    Can we solve the problem by making an automatic fake transaction that reverse the value of the GR/IR and creating another transaction can apply on it the settlement rule??
    You know that settlement rule process is one of the best features in the SAP system it save time and effort to make distributions manually

  • PO created with wrong Company code

    Hi Gurus,
    I have Plant XXXX assigned to Company code 1111 and
             Plant YYYY assigned to Company code 2222
    One of the user has created PO with Plant XXXX and company code wrong as 2222.
    (we have warning message setup & not error message. So, it allowed user to create PO with wrong Company code and save)
    GR & IR both are already posted. I find the accounting document of these GR/IR show correct company code as XXXX-1111 (mostly would have taken correctly based on plant XXXX).
    These are service POs (non stock).
    Now user wants to change the company code in PO to 1111.
    I checked...and system simply allow to change to company code to correct one i.e 1111. It does not give any message.
    Could any one give me some additional info.. if it is right to do so? I am not too convinced at this moment.
    I was suggesting user to reverse GR, IR, delete PO and create new PO. Is that right?
    Thanks n advance for your input.
    Best Regards,
    Mohan

    Dear Mohan,
    U can change the company code in PO as it will not have any impact since the GR and IR is completed.
    Accounts are hit based on the valution area(valuation grouping code).
    Since the PO is already closed u can go ahead the change the same.
    Regards,
    AM Vahanan

  • SRM PO created with wrong company code

    Hello,
            The users have created several PO in SRM with wrong company code. The user was found in the wrong organization structure during the creation of shopping and approval. The PO did not get transfer to the Back because of this. Is there a way to modify the PO and change the company code.
       In case we want to modify it in the tables given that BBP_PD gives you an indication of which table and entry to modify, is there a way to do this operation (like SE16N in ECC)? Have you ever done this and what risk is their in such an operation.
    Thank you.

    Hi,
    I doubt anyone here will (or will dare) suggesting to you how to do it as it is against SAP practise totally. if the document is created wrongly, it should be deleted and approved with all the tracking and changes in place for auditing purposes.
    Frankly that is what you should practise as well.. my 2cents opinion.
    Regards.
    YS

  • Balance carryforward is not correct due to incorrect GL created with wrong

    Hi team,
    We have created two gl accounts with wrong account group which is balance sheet and also made an postings to that gl account after year end process done so correcting this issue, now we have transferred that amount to new gl account which is p&l account and also we have executed FAGLGVTR (carry forward trasaction)but the amount is not reflecting in retained earning account so pls let me know solution for this issue.
    Thanks
    SAP

    Dear Seshu,
    You can Transfer the Retained earnings account balance to a new GL account for Retained earnings. And mark the previous account for mark for deletion / not to use and hence no postings will be allowed in the future to that GL account. And now you can carryforward normally in the future years use.
    Regards,
    Shankar K B.

  • Some of my apps are with wrong language.

    Some of my apps are with wrong language. Spotify is on holland and sleep cycle are on Chinese? Is there a way to change this ?
    My region is set right (Norwegian)

    Henrik,
    You should try setting your general system language to English, followed by setting it to Dutch again. Fixed it for me. Apps that don't have a translation to Dutch (at least that's what i'm guessing) now appear in English (which I think is fine). So before this 'fix' the phone must have somehow thought Chinese was my second language...
    https://discussions.apple.com/message/23148896#23148896
    Regards,
    Johan

  • Started new computer up with wrong itunes account how do i change it

    Started new imac with wrong itune account. How do i change it?

    Lunch iTunes - go to the Home page of the iTunes Store and select 'account' - you will get a dialog and you can log into your account.
    MJ

  • JDK 1.5 Serialization Compatibility with assert()

    I have the following class:
    class xyz implements java.io.Serializable {
       void doNothing() {
          int x = 0;
          assert x < 5;
    }If I compile it on both JDK 1.4 (with -source=1.4) and 1.5 (with -source=1.5) platforms, the serialVersion IDs are different. If I comment out the assert statement, the serialVersion on 1.5 platform changes to be the same as the 1.4. If I rebuild the 1.4 with the assert commented out, the serialVersionID does not change.
    Am I missing something here? I have code that needs to be compatible between these versions, but it now seems that the use of assert (other than the statment "assert true") built with 1.5 effects the serialization ID.

    Sure, I can define my own version, but the point is that I've got many fielded classes that have not changed, but now will fail serialization when comunicating with the new system simply because of the use of assertions with 1.5.
    It looks like I will be forced to either go back to 1.4, test all classes for serialization compatibility with 1.4, or remove the asserts from the code.
    In any case, it does not make sence to me why adding an assertion should change the serialVersionUID of a class in the first place when compiling under 1.5 and not under 1.4.

  • How many times with wrong password will phone lock out

    how many times with wrong password will phone lock out

    Depends on whether you have it set to erase data after 10 attempts. Otherwise it will lock out for a certain amount of time and then you can try again before it locks out again. However, if you cannot remember the passcode, you will have to restore the phone on the computer you normally sync with http://support.apple.com/kb/HT1212.

  • Xsl transformation of xml with wrong namespace

    I have xml with wrong namespace:
    <PAMStartedNotification xmlns="some site">
    <tUser>PLVUSER</tUser>
    </PAMStartedNotification>I need to leave this namespace and transform it.
    As a result of transformation now I get
    <tUser></tUser>
    ...I.e. XPath is not calculated properly.
    If I leave out that namespace then everything is ok.
    But I want to leave that namespace as it is.
    I use the following code to transform xml:
    Templates stylesheet = transformerFactory.newTemplates(new StreamSource(new File(fileName)));
    Transformer processor = stylesheet.newTransformer();
    java.io.StringWriter resultWriter = new java.io.StringWriter();
    StreamResult streamResult = new StreamResult(resultWriter);
    processor.transform(new StreamSource(new StringReader(xmlData)), streamResult);
    transformedXML = resultWriter.getBuffer().toString();Any ideas how to do that(transform xml with wrong namespace)?
    Edited by: prng on Dec 15, 2008 6:43 AM
    Edited by: prng on Dec 15, 2008 6:45 AM

    prng wrote:
    Sorry.
    Here is XPath I use to select tUser:
    /PAMStartedNotification/tUser
    Right. To start out, that selects a PAMStartedNotification element which is in no namespace. But yours isn't. It's in the default namespace, which doesn't have a prefix. You could try this XPath expression:
    /*[local-name() = 'PAMStartedNotification']/*[local-name() = 'tUser'](Untested, might have mis-typings and so on.)

Maybe you are looking for

  • Itunes will not recognize my IPOD G4

    Itunes will not recognize my G4 IPOD touch.  The IPOD Screen shows the itunes icon, and arrow and the cable icon. I've tried all the suggested remedies but nothing is working.  This is the first time I have tried to use the IPOD. Any help you can giv

  • Data not appear in ME49

    SAP I have problem with RFQ comparision statement sheet ((ME49). I maintained the rate, tax, delevery date, etc. with Tcode ME47 for against all RFQ's. when I take report comparision statement thru Tcode ME49, report comes but in QTY and Rate comes w

  • Profit center actual line items

    Hello ALL, What is the profit center actual line items display report in NEW GL -  ecc 6.0.I want to see all the line items posted to all accounts by profit center wise  in a particular period. Thanks, Sai.

  • JPA Bug !?

    Hi, I'm building a web shop using JPA. A couple of my entities are Category(as in category of items) and Item. Here is a minimized code preview : @Entity @Table(name = "category") @NamedQueries(....) public class Category implements Serializable { pr

  • Trying to insert a table and getting a "While executing objectTag in Table.htm, a JavaScript error o

    trying to insert a table and getting a "While executing objectTag in Table.htm, a JavaScript error occurred." message appears.  how do I fix this?