NetBeans Forums

 FAQFAQ   SearchSearch   MemberlistMemberlist   RegisterRegister   ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 
  

Why Netbeans 6.8 does not have visual web jsf?
Goto page Previous  1, 2, 3
 
Post new topic   Reply to topic    NetBeans Forums -> Java EE Users
View previous topic :: View next topic  
Author Message
jyeary



Joined: 21 Oct 2008
Posts: 605
Location: Simpsonville, SC

PostPosted: Wed May 26, 2010 2:07 pm    Post subject: Re: do you know some issue with time hour 0 in jdbc? Reply with quote

Is this a result of storing the value in one timezone compared to the database which may be storing it in another timezone? For example if the value is stored using GMT in both the application, and database are they different.


2010/5/25 nestor gomez munoz <address-removed ([email]address-removed[/email])>
Quote:
Hi!

Have any of you faced a problem with storing times when the hour is
cero?

Im storing data asociated to a timestamp. I use netbeans 6.8, glassfish
V2, JPA, toplink, jdbc 3.5 drivers from IBM informix and an Informix
database. The Entity has a temporal field

Back to top
nestor gomez munoz
Posted via mailing list.





PostPosted: Thu May 27, 2010 12:57 am    Post subject: Re: do you know some issue with time hour 0 in jdbc? Reply with quote

Both, database and netbeans application are in MST. Database server and
NetBeans IDE are in the same computer.
Thanks for your reply.

El mar, 25-05-2010 a las 18:45 -0400, John Yeary escribió:
Quote:
Is this a result of storing the value in one timezone compared to the
database which may be storing it in another timezone? For example if
the value is stored using GMT in both the application, and database
are they different.


2010/5/25 nestor gomez munoz <address-removed>
Hi!

Have any of you faced a problem with storing times when the
hour is
cero?

Im storing data asociated to a timestamp. I use netbeans 6.8,
glassfish
V2, JPA, toplink, jdbc 3.5 drivers from IBM informix and an
Informix
database. The Entity has a temporal field

@Basic(optional = false)
@Column(name = "hora")
@Temporal(TemporalType.TIME)
private Date hora;

It works ok for all the times but, when hora='00:15:00', for
instance,
it is stored '01:15:00' on the database table.

An example of my test:

fechaHora.setTime(sdfFechaHora.parse("2010-05-10
00:11:13"));
HistPK hpk = new HistPK();
hpk.setEquipo("AAAAAAAA");
hpk.setFecha(fechaHora.getTime());
hpk.setHora(fechaHora.getTime());
h.setHistPK(hpk);
histFacade.edit(h); // which is a em.merge(h)
System.out.println("recupero: "+h.getHistPK());

displays
recupero: persistencia.HistPK[equipo=AAAAAAAA, fecha=Mon May
10 00:11:13
MST 2010, hora=Mon May 10 00:11:13 MST 2010]

but in the database table es stored

AAAAAAAA 2010-05-10 01:11:13

... for any cause, it converts the hour 00: to 01:
I have done a variety of tests, I have change toplink for
eclipse link,
but the result is the same.

Do you have some advice?

Thanks in advance. Best regards.

--Néstor





--
John Yeary
--
http://javaevangelist.blogspot.com

"Far better it is to dare mighty things, to win glorious triumphs,
even though checkered by failure, than to take rank with those poor
spirits who neither enjoy much nor suffer much, because they live in
the grey twilight that knows not victory nor defeat."
-- Theodore Roosevelt
Back to top
Display posts from previous:   
Post new topic   Reply to topic    NetBeans Forums -> Java EE Users All times are GMT
Goto page Previous  1, 2, 3
Page 3 of 3

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You can attach files in this forum
You can download files in this forum


Powered by phpBB
By use of this website, you agree to the NetBeans Policies and Terms of Use. © 2012, Oracle Corporation and/or its affiliates. Sponsored by Oracle logo