Re: simpleDateFormat and April month

From: Paul Lutus (nospam_at_nosite.zzz)
Date: 09/16/04


Date: Thu, 16 Sep 2004 10:45:20 -0700

Nurettin Arslankaya wrote:

> Hi,
>
> possibly, i had a bug to report. Here is sample code to test :
>
> public Date StrToDate(String DT) throws Exception {
> SimpleDateFormat formatter = new SimpleDateFormat("yyyy-MM-dd
> HH:mm:ss");
> return formatter.parse(DT);
> }

That is not all the code you are using in your test. Please post a complete,
short, working program.

> When I test with fallowing data I got wrong result.
>
> 1980-04-01 00:00:00 returns 1980-04-01 01:00:00

Using what output routine?

> 1975-04-12 00:00:00 returns 1975-04-12 01:00:00
>
> for the dates It works wrong for 1 hour. when you enter 1980-04-01
> 01:00:00 it works correct but if you enter 1980-04-01 00:30:00 it
> returns also 1 hour later time.
>
>
> possibly there are several dates that has problem. I am using jre 1.4.
> Does anyone know why it resulting wrong.

No, no one knows. Why? You did not post your code.

-- 
Paul Lutus
http://www.arachnoid.com


Relevant Pages

  • Re: How to get crash dump when a unhandled CException is thrown by a MFC app
    ... I do not believe it could possibly be a "genuine bug". ... it doesn;t even mention bad_alloc as an exception; it mentions ... blindly, catch the exception, and report to the user that their data is bad. ... make these do clean recovery. ...
    (microsoft.public.vc.mfc)
  • Re: Visual Studio 2008 crashes on C# unhandled exception
    ... Add an event for the dateTimePicker 'Value Changed'. ... Doing a little research, I found an existing bug report from about six months ago, describing this specific problem. ... You can also see from the original report that you don't need an exception; simply setting a breakpoint in the event handler is sufficient. ... Probably the one thing that makes this bug so bad, in spite of the relatively narrow repro case, is that it's still there in VS2010! ...
    (microsoft.public.dotnet.languages.csharp)
  • simpleDateFormat and April month
    ... i had a bug to report. ... Here is sample code to test: ... public Date StrToDatethrows Exception { ... SimpleDateFormat formatter = new SimpleDateFormat("yyyy-MM-dd ...
    (comp.lang.java.programmer)
  • Re: to raise a exception isnt a bug
    ... only _not_ a bug, but required behaviour. ... package that the exception SAID it was in), is really, really, bad PR. ... Have you even looked ad the report? ...
    (Ubuntu)
  • Re: to raise a exception isnt a bug
    ... only _not_ a bug, but required behaviour. ... exception actually percolated to the user interface IS a bug, ... package, ... Have you even looked ad the report? ...
    (Ubuntu)