Skip to main content



      Home
Home » Eclipse Projects » Eclipse Platform » DateTime AM/PM problem
DateTime AM/PM problem [message #335387] Mon, 06 April 2009 02:41 Go to next message
Eclipse UserFriend
Originally posted by: jayduke.smith.gmail.com

Hi All,

I am trying to set time in DateTime component. But unfortunately it is not
setting AM/PM correctly.
Always it is displaying AM.

Is it a bug?


Thanks.
Re: DateTime AM/PM problem [message #335408 is a reply to message #335387] Mon, 06 April 2009 12:51 Go to previous messageGo to next message
Eclipse UserFriend
For PM times are you setting an hour value between 12 and 23 inclusive? If
so, which platform do you see this on?

Grant


"Jay D" <jayduke.smith@gmail.com> wrote in message
news:grc86b$clq$1@build.eclipse.org...
> Hi All,
>
> I am trying to set time in DateTime component. But unfortunately it is not
> setting AM/PM correctly.
> Always it is displaying AM.
>
> Is it a bug?
>
>
> Thanks.
>
>
Re: DateTime AM/PM problem [message #335409 is a reply to message #335408] Mon, 06 April 2009 13:10 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: jayduke.smith.gmail.com

yes, I am setting this, between 12 and 23 with eclipse 3.3.

"Grant Gayed" <grant_gayed@ca.ibm.com> wrote in message
news:grdbu0$1te$1@build.eclipse.org...
> For PM times are you setting an hour value between 12 and 23 inclusive?
> If
> so, which platform do you see this on?
>
> Grant
>
>
> "Jay D" <jayduke.smith@gmail.com> wrote in message
> news:grc86b$clq$1@build.eclipse.org...
>> Hi All,
>>
>> I am trying to set time in DateTime component. But unfortunately it is
>> not
>> setting AM/PM correctly.
>> Always it is displaying AM.
>>
>> Is it a bug?
>>
>>
>> Thanks.
>>
>>
>
>
Re: DateTime AM/PM problem [message #335420 is a reply to message #335409] Tue, 07 April 2009 10:20 Go to previous message
Eclipse UserFriend
My basic case pasted below works for me with swt 3.3 (running on win2000),
so it must be more specific to your context. I would suggest first trying
your case with a recent eclipse/swt build like
http://download.eclipse.org/eclipse/downloads/drops/S-3.5M6- 200903130100/index.php ,
and if you still see the problem there then modify the snippet below to show
it happening and log a report with swt (
https://bugs.eclipse.org/bugs/enter_bug.cgi?product=Platform &component=SWT ).

public static void main (String [] args) {
final Display display = new Display ();
final Shell shell = new Shell (display);
shell.setLayout(new FillLayout());
DateTime dateTime = new DateTime(shell, SWT.TIME);
shell.pack();
shell.open();
dateTime.setHours(22);
while (!shell.isDisposed ()) {
if (!display.readAndDispatch ()) display.sleep ();
}
display.dispose ();
}

Thanks!
Grant


"Jay D" <jayduke.smith@gmail.com> wrote in message
news:grdd1i$i5j$1@build.eclipse.org...
> yes, I am setting this, between 12 and 23 with eclipse 3.3.
>
> "Grant Gayed" <grant_gayed@ca.ibm.com> wrote in message
> news:grdbu0$1te$1@build.eclipse.org...
> > For PM times are you setting an hour value between 12 and 23 inclusive?
> > If
> > so, which platform do you see this on?
> >
> > Grant
> >
> >
> > "Jay D" <jayduke.smith@gmail.com> wrote in message
> > news:grc86b$clq$1@build.eclipse.org...
> >> Hi All,
> >>
> >> I am trying to set time in DateTime component. But unfortunately it is
> >> not
> >> setting AM/PM correctly.
> >> Always it is displaying AM.
> >>
> >> Is it a bug?
> >>
> >>
> >> Thanks.
> >>
> >>
> >
> >
>
>
Previous Topic:Reading local history
Next Topic:Section does not show up right
Goto Forum:
  


Current Time: Tue Apr 29 03:00:39 EDT 2025

Powered by FUDForum. Page generated in 0.10365 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top