Issue with Java date when different timezone involved

Hi
I am facing a problem with java util and SQL date due to different time zones,
We have a applet which displays data as gant chart( microsoft project type)
We have our server in NY (EST) which reads data from database (in EST) and sends this data to applet using applet-servlet communication (seralize object)
This applet gets this date from servlet, does some calculation for pixcels and paints it, but now i am having problem with this calculation, since the date coming is from EST and calendar object in applet is from CST.
How do i resolve this
Ashish

How are you passing the date or doing the calculation?
I guess you're not using java.util.Date because then would have no problems. The Date class already accounts for different timezones; an instance represents a single moment of time which can be rendered differently depending on the time zone.

Similar Messages

  • Has anyone had issues with Administration\Data Import/Export\Data Import???

    Has anyone had issues with Administration\Data Import/Export\Data Import???
    I have a client who has recently upgraded from V2007 to V8.81. They were succesfuly  using this standard function to import supplier prices to their master price list, but now it has failed?
    I have looked at the file they are importing and it appears to be fine.
    On closer inspection, it did contain approx 46,000 entries, so I took the first 1,000 and created a test file, which imported fine.
    The only issue I found was Speed, with the test file of 1,000 records taking about 30 Mins to import. This appeared to get slower and slower the further through the file it got!
    Based on this, I have estimated that the whole file would takle about 13 hours to import. The client say that when they used to run it on version 2007 it was far quicker?
    In practice, it does appear to run, but the speed is the issue. Having said this, I set the whole file to run last night (over night)and this morning it had appeared to hang after about 2,307 rows, with nothing else being updated.
    Has anyone any ideas or is aware of performance issues like this?
    Thanks,
    Ian

    Always an option, but would you give your clients access to this tool?
    Not sure really.
    I have uploaded a copy of their database onto my test system and run the same routine. Its equally as SLOW
    I can't gauage if its an issue with 8.81 that 2007 didn't have, as I only have the client's word on it, however I have no reason to disbelieve them.
    Kind regards,
    Ian

  • Issue with 2LIS_02_SCL Data source

    Hi Everybody,
    I am facing the below 2 issues with 2lis_02_scl data source,
    1) This is fetching only the records  ETENR (Delivery Schedule Line Counter) value with ' 1 ', It is ignoring others ex:2,3 and 4. Hence Data is not reconciling with ECC system.
    2) The standard field GLMNG is not getting any data, Data was existed in table(EKET) level. So i have written the code and data is coming now. But the problem is, This is not considering the ROCANCEL indicator it seems. All the other key figures values are coming in with Negative sign When ROCANCEL Value is ' X ' or ' R ', But this field is getting all the positive values irrespective of ROCANCEL indicator. Hence showing the incorrect values compared to the ECC.
    Can anybody help me on this,
    Regards,
    Gopinath

    Hi Gopinath:
       Have you already applied any SAP Note to solve this problem?
    Please check if the SAP Note below is applicable to your system.
    668177 - "LIS BW: wrong quantity for documents with invoice plan"
    Regards,
    Francisco Milán.

  • I am  having  issues  with java

    OK well I finally got  the java update to full load and it stated that it was corrupt or something like that and now I can not get into my favorite chat room it says I need to get java ..   when I go to the link to  re get a update to java it says I am updated.. so I called apple and they sent me a patch or something and it did not help .. anyone have any ideas what is happening?
    my old chatroom I think I remember someone talking about java issues there and how you had to have a old java  or something like that ..  can somehelp please!

    golam wrote:
    I am having issues with java encoding in Gentoo Linux environment. I am using java 1.6. When I ran the following test application to print french accent with encoding type, all I get is wrong character. Please provide me with some pointers. When I try this in Windows, it works perfectly. Many Thanks in advance
    //test.txt file contains the following string
    àäèéêëîïôùûüÿ
    ///TEST CODE to find which encoding to use
                              System.out.println("encoding:"+encoding[i]+"line===>"+inputLine);
    This is the problem.
    Don't assume the console character set can display these characters,
    use a swing component.
    This is also why it happens to work in on some boxes and not on others.
    ///////////////OUTPUT after running the test app
    java Test encoding:Big5line===>???????
    encoding:Big5-HKSCSline===>???????
    encoding:EUC-JPline===>???????
    encoding:EUC-KRline===>???????
    encoding:GB18030line===>???????
    encoding:GB2312line===>???????
    encoding:GBKline===>???????

  • I  have an issue with speaker/microphone. when i call or i  recive a call the person on the other side can not hear me.

    i  have an issue with speaker/microphone. when i call or i  recive a call the person on the other side can not hear me.

    Hello aalapdesai112,
    Lets see if we can get you back to taking calls normally again. Start your troubleshooting with the article below and go through checking to making sure that you are up to date with your iOS as well as a simple restart on your iPhone. 
    If your voice is too faint or sounds unclear using iPhone, or iPod touch
    http://support.apple.com/en-us/HT203792
    Regards,
    -Norm G. 

  • Does Safari have issues with Java?

    When I log into my IG Index financial spread betting account safari usually quits unexpectedly immediately after the dealing screen has loaded. This is causing me huge frustration. The site relys a lot on Java. I believe there were issue with Java in Mac OS 10.3.9 that may still exist on 10.4.X
    Any ideas?

    Do you have the latest versions of Java installed?
    Have you enabled Java in Safari's preferences?

  • Issue with Emoji icons when sent from iOS6 to iOS5

    Issue with Emoji icons when sent from iOS6 to iOS5, all icons appear as a square on the iOS5 message screen.
    Both iOS are the current version and the phones are 4S 64GB
    Anybody got this problem

    Hi!
    What kind of RFC do you use? If you use synchronous RFC the caller waits for the answer/result of the called function. In normal cases this should solve your issue.
    Regards,
    Volker

  • I am having a issue with getting data useage alerts for my iphone 4s

    I am having a issue with getting data useage alerts for my iphone 4s from AT&T.  I do not download anything huge at all.
    I looked into it and figured out that the phone dials out nightly at 12:29am every night.   I went into my settings and went to general..about..diagnostics and useage..then diagnostics and useage data to see this.  I then clicked don't send...but I am still getting useage alerts.  Can anyone help me please...
    Thanks

    Honestly, from reading the thread linked, they all come off as a bunch of whiney people that cannot be bothered to help themselves.
    Little to nothing in that thread indicates an issue beyond inept consumers.  Yes, I read several pages on the incessant gripes.  Very few made any actual attempts to troubleshoot issues before whining about the "Apple issue" and those that did actual troubleshooting got their issues resolved.
    So no, Apple has nothing to fix beyond a few specific devices that are experiencing hardware issues.
    If you have actually put forth effort and done the basic troubleshooting, take the device to Apple for evaluation and possible replacement.  Whining will get nothing accomplished.

  • Hi BC, I have an issue with BC. When the shopping cart is used it takes stock out of inventory and h

    Hi BC,
    I have an issue with BC. When the shopping cart is used it takes stock out of inventory and holds it, regardless of whether or not a customer proceeds to purchase. OK.
    To make matters worse, the stock is only cleared from the shopping cart when the customer closes the browser - not when they close the shopping window.
    Now lets say a customer doesn't close their browser for a month - it happens! .. when their stock is finally returned it may throw out our stock levels that have in the meanwhile been adjusted. So their stock will be added on top of an accurate stock take, putting stock in that isnt really available.
    This is causing us mayhem.
    We have not yet seen if stock is actually returned at all. In the test we did today where we filled a shopping cart then closed the browser without making a purchase, the stock was not returned immediately. So we dont even know when it will be returned - thats IF a customer actually closes their browser. Any solutions out there?
    Jo

    Hi there,
    The way stock is managed in this situation is desirable for many in that case otherwise shopping on a site and adding to cart would not be viable or use friendly.
    What you mention about not closing a browser though is a case that is not true. IF you go into the shop settings in the admin you can see the cart restore timer which is by default 24 hours but you can change this to as low as 1 hour if you wish.

  • Problem with updating oracle DB with java date thru resultset.updateDate()

    URGENT Please
    I am facing problem in updating oracle database with java date through resultset.updateDate() method. Can anybody help me please
    following code is saving wrong date value (dec 4, 2006 instead of java date jul 4, 2007) in database:
    ResultSet rs = stmt.executeQuery("SELECT myDate FROM myTable");
    rs.first();
    SimpleDateFormat sqlFormat = new SimpleDateFormat("yyyy-mm-dd");
    java.util.Date myDate = new Date();
    rs.updateDate("myDate", java.sql.Date.valueOf(sqlFormat.format(myDate)));
    rs.updateRow();

    I believe you should use yyyy-MM-dd instead of yyyy-mm-dd. I think MM stands for month while mm stands for minute as per
    http://java.sun.com/j2se/1.4.2/docs/api/java/text/SimpleDateFormat.html
    (If this works, after spending so much of your time trying to solve it, don't hit yourself in the head too hard. I find running out of the room laughing hysterically feels better).
    Here is a more standard(?) way of updating:
    String sqlStatement=
    "update myTable set myDate=? where personID=?"
    PreparedStatement p1= connection.prepareStatement(sqlStatement);
    p1.setDate(1,new java.sqlDate());
    p1.setInt(2, personID);
    p1.executeUpdate();

  • CVC creation - Strange issue with Master data table of 9AMATNR

    Hi Experts,
    We have encountered a strange issue with Master data table (/BI0/9APMATNR) of info object 9AMATNR.
    We have a BADI implemented for checking the valid Characteristic before creation of the CVC using transaction /SAPAPO/MC62. This BADI puts a select on master data tab of material /BI0/9APMATNR and returns no value. But the material actually exists in the table (checked through SE16).
    Now we go inside the info object 9AMATNR and go to the Master data Tab. There we go inside the master table
    /BI0/9APMATNR and activate that. After activating the table it is read by the select statement inside BADI (Strange) and allows the CVC to be created.
    Ideally it should not allow us to activate the SAP standard table /BI0/9APMATNR. I observed that in technical settings of this table it has single record buffering as switched on. (But as per my knowledge buffer gets refreshed every 2 to 4 mins and not in 2 days or something).
    Your expert comment is valuable to us. Thanks.
    Best Regards,
    Chandan Dubey

    Hi Chandan,
                 Try to use a WAIT statment with 5 seconds before your select statment.
    I'm not sure whether this will work. Anyway check it and let me know the result.
    Regards,
    Siva.

  • Issue with BAPI_ACC_***_TRANSFER_POST (when trying to execute as per ABT1N)

    Hello experts,
    For this thread, please check the following link:
    [Issue with BAPI_ACC_***_TRANSFER_POST (when trying to execute as per ABT1N);
    Thanks and Regards,
    Daniel.

    Hi Experts,
    The question has been answered as per the following "link":
    [Issue with BAPI_ACC_***_TRANSFER_POST (when trying to execute as per ABT1N);
    Daniel

  • Issue with fetching records when SalesForce Date Fields involved

    Using the Events application of Salesforce I enter a record of data.  The record has a Start Date of Monday and an End Date of Friday for a given week.  Crystal will not fetch/display the record in the report.  If I go back and change the Start Date and the end Date to teh same day, the record will print in Crystal.
    Is there some Date flag within Crystal that I need to toggle allowing a record to print based on date ranges?  I don't understand why a record would print when Start and End Date are the same but will not print when different?

    Here is the code....  I have also noticed that there are three fields - Start Date, End Date and Due Date.  Only when all 3 fields are set to the same value within Salesforce will the record print in Crystal.  I have tried removing any reference to the Date fields in the crystal report but its not helping
    www.salesforce.com
    SELECT Name, Id
    FROM   Account
    EXTERNAL JOIN Account.Id={?www.salesforce.com: Event.AccountId}
    www.salesforce.com
    SELECT ActivityDate, CAT_Type__c, Subject, Location, PO_Number__c, CO_Number__c, Is_Closed__c, Description, Submit_For_Invoice__c, Is_Scheduled__c, Status__c, RecurrenceStartDateTime, RecurrenceEndDateOnly, OwnerId, AccountId
    FROM   Event
    WHERE  (CAT_Type__c='Remote Support - Non Revenue' OR CAT_Type__c='Remote Support - Revenue' OR CAT_Type__c='Travel - Non Revenue' OR CAT_Type__c='Travel - Revenue') AND (Status__c='Closed' OR Status__c='Complete - Not Closed' OR Status__c='Open')
    EXTERNAL JOIN Event.AccountId={?www.salesforce.com: Account.Id} AND Event.OwnerId={?www.salesforce.com: User.Id}
    www.salesforce.com
    SELECT LastName, Id
    FROM   User
    EXTERNAL JOIN User.Id={?www.salesforce.com: Event.OwnerId}

  • FR Studio - Is there a workaround for the issue with referencing data from a grid with a different DB connection and different # of dimensions?

    Hi,
    I am trying to reference a column in a different grid with a different database connection. I did some research in the forums, and it seems like this is a known issue with FR Studio. The issue is that if the 2 different database connections have different # of dimensions, then the reference will throw an error.
    For example, what I'm trying to do is below:
    In grid2.column[A], I have the following formula:
    grid1.column[A]
    The result is an error.
    The ultimate goal is to have a basic variance formula in the grid between grid1 and grid2, which have different database connections with a different # of dimensions. Is there a workaround at all to this bug? The example of the basic formula is below:
    grid1.column[A] - grid2.column[A] 
    Any help is much appreciated!
    Thanks,
    Tiffany

    Thanks for the detailed response Mike.
    The issue with trying it in Grid1 vs Grid2 is that Grid1's DB connection has more dimensions than Grid2's DB connection. I can't change the DB connection to a database with more dimensions because you have to be able to map all dimensions from the existing DB connection  (Grid1) to the new DB connection (Grid2). This isn't possible, so instead I have to map Grid2 (less dimensions) to Grid1 (more dimensions). It just ignores the extra dimensions from Grid1. Does that make sense?
    Thanks again for your responses. It's very much appreciated.
    Tiffany

  • Issue with xsd Data type mapping for collection of user defined data type

    Hi,
    I am facing a issue with wsdl for xsd mapping for collection of user defined data type.
    Here is the code snippet.
    sample.java
    @WebMethod
    public QueryPageOutput AccountQue(QueryPageInput qpInput)
    public class QueryPageInput implements Serializable, Cloneable
    protected Account_IO fMessage = null;
    public class QueryPageOutput implements Serializable, Cloneable
    protected Account_IO fMessage = null;
    public class Account_IO implements Serializable, Cloneable {
    protected ArrayList <AccountIC> fintObjInst = null;
    public ArrayList<AccountIC>getfintObjInst()
    return (ArrayList<AccountIC>)fintObjInst.clone();
    public void setfintObjInst(AccountIC val)
    fintObjInst = new ArrayList<AccountIC>();
    fintObjInst.add(val);
    Public class AccountIC
    protected String Name;
    protected String Desc;
    public String getName()
    return Name;
    public void setName(String name)
    Name = name;
    For the sample.java code, the wsdl generated is as below:
    <?xml version="1.0" encoding="UTF-8" ?>
    <wsdl:definitions
    name="SimpleService"
    targetNamespace="http://example.org"
    xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/"
    xmlns:tns="http://example.org"
    xmlns:xsd="http://www.w3.org/2001/XMLSchema"
    xmlns:mime="http://schemas.xmlsoap.org/wsdl/mime/"
    xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/"
    xmlns:soap12="http://schemas.xmlsoap.org/wsdl/soap12/"
    >
    <wsdl:types>
    <xs:schema version="1.0" targetNamespace="http://examples.org" xmlns:ns1="http://example.org/types"
    xmlns:xs="http://www.w3.org/2001/XMLSchema">
    <xs:import namespace="http://example.org/types"/>
    <xs:element name="AccountWSService" type="ns1:accountEMRIO"/>
    </xs:schema>
    <xs:schema version="1.0" targetNamespace="http://example.org/types" xmlns:ns1="http://examples.org"
    xmlns:tns="http://example.org/types" xmlns:xs="http://www.w3.org/2001/XMLSchema">
    <xs:import namespace="http://examples.org"/>
    <xs:complexType name="queryPageOutput">
    <xs:sequence>
    <xs:element name="fSiebelMessage" type="tns:accountEMRIO" minOccurs="0"/>
    </xs:sequence>
    </xs:complexType>
    <xs:complexType name="accountEMRIO">
    <xs:sequence>
    <xs:element name="fIntObjectFormat" type="xs:string" minOccurs="0"/>
    <xs:element name="fMessageType" type="xs:string" minOccurs="0"/>
    <xs:element name="fMessageId" type="xs:string" minOccurs="0"/>
    <xs:element name="fIntObjectName" type="xs:string" minOccurs="0"/>
    <xs:element name="fOutputIntObjectName" type="xs:string" minOccurs="0"/>
    <xs:element name="fintObjInst" type="xs:anyType" minOccurs="0" maxOccurs="unbounded"/>
    </xs:sequence>
    </xs:complexType>
    <xs:complexType name="queryPageInput">
    <xs:sequence>
    <xs:element name="fPageSize" type="xs:string" minOccurs="0"/>
    <xs:element name="fSiebelMessage" type="tns:accountEMRIO" minOccurs="0"/>
    <xs:element name="fStartRowNum" type="xs:string" minOccurs="0"/>
    <xs:element name="fViewMode" type="xs:string" minOccurs="0"/>
    </xs:sequence>
    </xs:complexType>
    </xs:schema>
    <schema xmlns="http://www.w3.org/2001/XMLSchema" targetNamespace="http://example.org"
    xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:tns="http://example.org" xmlns:ns1="http://example.org/types">
    <import namespace="http://example.org/types"/>
    <xsd:complexType name="AccountQue">
    <xsd:sequence>
    <xsd:element name="arg0" type="ns1:queryPageInput"/>
    </xsd:sequence>
    </xsd:complexType>
    <xsd:element name="AccountQue" type="tns:AccountQue"/>
    <xsd:complexType name="AccountQueResponse">
    <xsd:sequence>
    <xsd:element name="return" type="ns1:queryPageOutput"/>
    </xsd:sequence>
    </xsd:complexType>
    <xsd:element name="AccountQueResponse" type="tns:AccountQueResponse"/>
    </schema>
    </wsdl:types>
    <wsdl:message name="AccountQueInput">
    <wsdl:part name="parameters" element="tns:AccountQue"/>
    </wsdl:message>
    <wsdl:message name="AccountQueOutput">
    <wsdl:part name="parameters" element="tns:AccountQueResponse"/>
    </wsdl:message>
    <wsdl:portType name="SimpleService">
    <wsdl:operation name="AccountQue">
    <wsdl:input message="tns:AccountQueInput" xmlns:ns1="http://www.w3.org/2006/05/addressing/wsdl"
    ns1:Action=""/>
    <wsdl:output message="tns:AccountQueOutput" xmlns:ns1="http://www.w3.org/2006/05/addressing/wsdl"
    ns1:Action=""/>
    </wsdl:operation>
    </wsdl:portType>
    <wsdl:binding name="SimpleServiceSoapHttp" type="tns:SimpleService">
    <soap:binding style="document" transport="http://schemas.xmlsoap.org/soap/http"/>
    <wsdl:operation name="AccountQue">
    <soap:operation soapAction=""/>
    <wsdl:input>
    <soap:body use="literal"/>
    </wsdl:input>
    <wsdl:output>
    <soap:body use="literal"/>
    </wsdl:output>
    </wsdl:operation>
    </wsdl:binding>
    <wsdl:service name="SimpleService">
    <wsdl:port name="SimpleServicePort" binding="tns:SimpleServiceSoapHttp">
    <soap:address location="http://localhost:7101/WS-Project1-context-root/SimpleServicePort"/>
    </wsdl:port>
    </wsdl:service>
    </wsdl:definitions>
    In the above wsdl the collection of fintObjInst if of type xs:anytype. From the wsdl, I do not see the xsd mapping for AccountIC which includes Name and Desc. Due to which, when invoking the web service from a different client like c#(by creating proxy business service), I am unable to set the parameters for AccountIC. I am using JAX-WS stack and WLS 10.3. I have already looked at blog http://weblogs.java.net/blog/kohlert/archive/2006/10/jaxws_and_type.html but unable to solve this issue. However, at run time using a tool like SoapUI, when this wsdl is imported, I am able to see all the params related to AccountIC class.
    Can some one help me with this.
    Thanks,
    Sudha.

    Did you try adding the the XmlSeeAlso annotation to the webservice
    @XmlSeeAlso({<package.name>.AccountIC.class})
    This will add the schema for the data type (AccountIC) to the WSDL.
    Hope this helps.
    -Ajay

Maybe you are looking for