Error in the conversion of a date in ms for october before 1996

Hi,
I have the following problems (using of the jdk 1.5.0_15)
One hour is systematicallay added when i ask to convert a date in millisecond for a date with first days of the month of october before 1996.
Unit test
try {
  SimpleDateFormat form = new SimpleDateFormat(
  "yyyy-MM-dd HH:mm:ss.S");
  Date date = form.parse("1995-09-06 00:00:00.0");
  System.out.println(date.getTime());
  System.out.println("810338400000");
  date = form.parse("1995-10-06 00:00:00.0");
  System.out.println(date.getTime());
  System.out.println("812930400000");
  date = form.parse("1995-10-30 00:00:00.0");
  System.out.println(date.getTime());
  System.out.println("815007600000");
  date = form.parse("1995-11-06 00:00:00.0");
  System.out.println(date.getTime());
  System.out.println("815612400000");
  date = form.parse("1996-10-06 00:00:00.0");
  System.out.println(date.getTime());
  System.out.println("844552800000");
  date = form.parse("1996-11-06 00:00:00.0");
  System.out.println(date.getTime());
  System.out.println("847234800000");
  } catch (Exception e) {
       e.printStackTrace();
A decalage appears for 1995-10-06 00:00:00.0, the result should be 812930400000 but 812934000000 (1 hour more) is retrieved.
Anyone has an idea what's happening?
sincerely

I have the following problems (using of the jdk 1.5.0_15)
One hour is systematicallay added when i ask to convert a date in millisecond for a date with first days of the month of october before 1996.
Why are you still using such an ancient version of Java?
There have been many changes to Timezone functionality since 2005 especially for Daylight Savings Time calculations.
At a minimum, you should update your Jave version with the latest timezone data. Get the TZUpdate tool and use it and then retest and post the results.
http://www.oracle.com/technetwork/java/javase/tzupdater-readme-136440.html
Here are two closely related links
http://www.oracle.com/technetwork/java/javase/dst-faq-138158.html
http://www.oracle.com/technetwork/java/javase/timezones-137583.html

Similar Messages

  • Re: Error in the conversion of a date in ms for october before 1996

    939520 wrote:
    I searched Google for SimpleDateFormat and Timezone, and found this article:
    http://eyalsch.wordpress.com/2009/05/29/sdf
    Looks like you might consider using GMT time for all date/time calculations as follows, which
    will return the same value everywhere in the world:
      SimpleDateFormat sdf = new SimpleDateFormat('dd-MM-yyyy');
      sdf.setTimeZone(TimeZone.getTimeZone("GMT"));
    Note: I always store GMT time in the database for all projects, then convert it to a person's locale as needed for display.
    The OP's code assumes that the string dates are in his default timezone. His code will convert these dates to java.util.Date objects which store all dates as the number of milliseconds since 1/1/1970 00:00:00 UTC ( the epoch ). There is only ever any need to specify the timezone with SimpleDateFormat if the date string is is not in the default time zone. The site the OP is using as a reference also assumes that the string versions are in the default time zone so the comparison should be valid.
    P.S. Strictly one should use UTC and not the outdated GMT.

    I have the following problems (using of the jdk 1.5.0_15)
    One hour is systematicallay added when i ask to convert a date in millisecond for a date with first days of the month of october before 1996.
    Why are you still using such an ancient version of Java?
    There have been many changes to Timezone functionality since 2005 especially for Daylight Savings Time calculations.
    At a minimum, you should update your Jave version with the latest timezone data. Get the TZUpdate tool and use it and then retest and post the results.
    http://www.oracle.com/technetwork/java/javase/tzupdater-readme-136440.html
    Here are two closely related links
    http://www.oracle.com/technetwork/java/javase/dst-faq-138158.html
    http://www.oracle.com/technetwork/java/javase/timezones-137583.html

  • I recently subscribed to Adobe ExportPDF and tried to convert a PDF file to MS Word.  So far,  after many tries,  I get soe type of error and the conversion fails.  Please advise?

    I recently subscribed to Adobe ExportPDF and tried to convert a PDF file to MS Word.  So far,  after many tries,  I get soe type of error and the conversion fails.  Please advise?

    Hi there,
    It sounds like there may be an issue with the quality of the PDF. Not all PDFs are created equal, and especially those created from scanned documents can be problematic if the scan quality isn't the best. Is there a dark background on the PDF, or stray marks or smudges?
    You can try converting with OCR disabled at outlined in this document: How to disable Optical Character Recognition (O... | Adobe Community. But, while that's a good test to find out where the problem lies, you'll end up with a Word document that isn't editable, so it's not an optimal solution.
    Please let us know how it goes.
    Best,
    Sara

  • In 2014, Since I upgraded my OS to Win 7, everytime I update Acrobat X Standard I get and error.  The problem seems to be with permissions for folders is there a permanent fix??

    In 2014, Since I upgraded my OS to Win 7, every time I update Acrobat X Standard I get and error.  The problem seems to be with permissions for folders is there a permanent fix??

    Is there any indication of the specific folder you are having problems with. Are you logged in as the administrator (or the same as when you installed) and have anti-virus disabled during the update? You might also try the updates from http://www.adobe.com/support/downloads/product.jsp?product=1&platform=Windows.

  • To read COMTRADE file in Labview there is an example provided. Can somebody provide the sample .cfg and .dat files required for its working?

    To read COMTRADE file in Labview there is an example provided. Can somebody provide the sample .cfg and .dat files required for its working?

    Thanks for the reply.
    But this library doesn't contain any sample .cfg and .dat files which can be read and understood. Can you please provide the same?

  • I am having trouble downloading an extension for flash, despite having the most up to date flash version for Adobe Manager Extension CC. What would cause this to happen?

    I am having trouble downloading an extension for flash, despite having the most up to date flash version for Adobe Manager Extension CC. What would cause this to happen? It says I need to have flash 7 or higher. I have the most update flash available according to my browsers.

    If you are using Flash Pro CC 2014, please update Extension Manager CC to 7.2.1. Then please confirm whether Flash is shown in the product panel of Extension Manager CC. If not, please refer to Re: Why can't I see InDesign CC in my Extension Manager CC.

  • First create the valuation-type-independent data in LSMW for MM

    Hello All,
    I have uploaded MM FHMI using LSMW except accounting view.
    I am trying to upload Accounting view separately and got an error "First create the valuation-type-independent data"
    I am using Tcode= MM01.
    What to do now?
    Regards,
    Jyothishree C P

    Hi all,
    I'm using BAPI_MATERIAL_SAVEDATA for opening all views of material. I I try to open COST and ACCOUNT views, still having same message error "First create the valuation-type-independent data".
    Also If I don't open ACCOUNT and COST views, the creation works fine. After in updating material, I set up the VALUATIONDATA / X structure but the error is the same.
    We use "split valuation on material" and the Valuation Type is a mandatory field.
    Any help?
    Thanks in advance.
    GB

  • Recently, when I want to burn a CD, I'm receiving the error message - "The Registry settings used by iTunes drivers for importing and burning CD's

    Maybe someone can help me - lately, I keep receiving this error message when I want to burn a CD: "The Registry settings used by iTunes drivers for importing & burning CD's is missing. Please re-install iTunes." I've re-installed a number of times and it still won't burn CD's. I can play the music through my PC. I just can't burn CD's. any ideas?

    Same problem as me. No answers though. Also I can't access the itunes store. There is something missing in the registry but what? Seeing as your post was sometime ago it looks like there is no help.

  • Error message: The item category 'ZTPS' is not permitted for product '134'

    Hi experts,
    When I try to create a sales order in CRM, I find the error: "The item category 'ZTPS' is not permitted for product '134'".
    how can I solve this problem?
    thank you for helping me,
    Marco

    hi,
    I tried to perform the "define item category determination" activity, but the problem is that the possible entries for "Item category groups" and "Item usage" are different in the two systems:
    for example in R/3 I find some entries with Item Category group = LEIH (returnable packaging),
    when i try to insert this Item category group in CRM i press f4 to see possible entries but Ican't find the value LEIH.
    how is it possible?
    THANK YOU!
    m

  • Error: At the conversion of a text from codepage '4110' to codepage '4102':

    I am trying to open an ANSI file from Application server.
    I am using "open dataset F_FILENAME for input in text mode encoding default."
    For some ANSI files it works fine, and for some it fails. I want to open this file and validate it , post it back on to application server
    with its original format.
    How do I achieve this? THanks,
    Below is the system config.
    Database codepage                         Unicode
    Current Codepage of Appl. Server    4102
    Codepage of Front End               4110  UTF-8 GUI

    Hi Shabbir,
    The statement "open dataset F_FILENAME for input in text mode encoding default" would open the file with the default codepage of your system which is 4102 for your system.
    Due to which the SAP system implicitly coverts the characters in the file to 4102 codepage. You might get "CONVT_CODEPAGE" error if system is not able to convert some characters in the file.
    You should use
    Open dataset F_FILENAME for input in legacy text mode code page 1100
    Check the following link for syntax.
    [open dataset in SAP|http://help.sap.com/saphelp_nw04/helpdata/en/79/c554a0b3dc11d5993800508b6b8b11/frameset.htm]
    You can also use " IGNORING CONVERSION ERRORS " to avoid "CONVT_CODEPAGE" errors..
    Cheers
    Ajay

  • Error in the Source system while data loding through Process Chain

    Hi,
    I am facing issue while data loading for certain extractors through Process chain. Load of 0BPM_WIHEAD, 0BP_LOGHIST, OBPM_OBJREL, 0BPM_DEADLINES(there are 2-3 more extractors) is getting failed daily with message Error occurred in the source system and if we repeat the same it is getting executed successfully.
    Regards,
    Javed

    Hi..
    It means that the extraction job is failing in the source system..
    Please check the Job log in the source system  --> Copy the request nimber --> In the source system go to SM37 --> Give * then the request number......execute --> Check the Job log..
    Look there may be multiple reasons behind this....
    1) Connection problem : Go to SM59 and test the connection, If you don't have the access in SM59...then go to RSA1 --> Source Systems --> Right click --> Connection Parameters --> Connection Test
    2) Or may be work processes are not available and due to which jobs are failing due to time out...
    In both the cases you can check with the Basis Team if they can suggest something....or you can change the process chain scheduling time if possible, and schedule it in such a time when less no of jobs are running..
    Regards,
    Debjani..

  • Error in the G/L master data

    HI,
    Error message comes no direct posting made to a particular gl account
    error is gl account is a control account   transactions cannot be posted direct to control account.

    Hi,
    In GL master data the  GL  account , the check box u201Cpost automatically onlyu201D might be selected in create/bank/interest tab.
    If you want to make direct postings, you have to deselect the above check box.
    Thanks
    Santhi

  • Error in the Moment of Change Date ESS Address

    Good Afternoon,
    I have the following issue,
    When the employee tried of change date of address the system display a message of Error:
    ! You have no authorization to Insert!
    The other issue is that the system not update the field Municipality in the moment of select the field of the listbox Region, ie the listbox aren't dynamic.
    Someone know of some note?
    Regards,
    Wilman

    To Begin with its suggested that you either use a standard Employee role, or copy of Standard role. and then you can remove unwanted authorizations from them.
    refer
    helps[help|http://help.sap.com/saphelp_erp60_sp/helpdata/en/99/76b6c6eb2711d1899d0000e8216659/frameset.htm]
    Hope this helps.
    Rgds

  • SP A10-Error 633: The modem is not installed or configured for Dial-Up

    Ive already reformatted the hard drive and used the utilities CD to install the modem driver again. Anyone got any advice on how to solve problem? Would an external modem solve it?
    By the way it is a satellite pro A10

    Hello
    If the HDD is formatted use the recovery CD and reinstall OS. After that the modem should be recognized and installed properly. After that configure Dial up connection and check the modem. If the modem is not defective it should work.
    The strange thing is that there is error 633 that means: The port is already in use or is not configured for Remote Access dialout.
    Please check this interesting site http://www.modemsite.com/56k/duns633.asp .
    If there is no success please write again.
    Bye

  • COnVERSION ROUTINE in data element level

    how can we write the CONVERSION ROUTINE in data element level for a field in data dictionary ?.........plz if possible give the EXAMPLE code also?

    Hi,
    You can refer to any of the standard conversion routines like ALPHA to get an idea. It is used in case of work order (AUFNR).
    Regards
    Sayee

Maybe you are looking for

  • How to Drill Down Between Queries

    Hi Experts, I am fairly new to developing reports, so at the current system there are 2 queries Summary(on a Cube) and Detail(on ODS). These are independent queries rt now. I want to pass Cost center and fiscal Period as parameters from Summary to De

  • Best way to bulk insert records to sqlserver ??

      Hi, Actually i encountered an issue regarding inserting the lakhs of records(10lakhs)  in to sql server table using c#. the appropriate ways i know is using SqlBulkCopy or using parallel programming(LINQ) . i want to know which one is best accordin

  • Job Openings - NI Alliance Partner ~ New Delhi, India

    Company Profile- Nexus Engiconsults Pvt Ltd is a system integrator and custom solutions provider in the field of test & measurement and automated control, through intuitive software development on the NI LabVIEW programming environment. Nexus engicon

  • Create pfile from spfile when oracle in idle mode

    Create pfile from spfile when oracle in idle mode from where it creates pfile?? note:-oracle is in idle stage..

  • Copying component assignment at Routings

    Hello, i am finding that the component assigmnets do not copy over to new routing when you copy using a older routings. Have seen this issue before on some forums but not sure of the best way to resolve this. Please provide feedback/ guidance. Regard