jsf myfaces calendar problem
hi, guys,
i have a problem with myfaces 1.1.1.
myfaces-all.jar used.
it is totally ok, can write the right date in DB, but the date readd from DB will be shown a day before the date of DB.a litte funny. for example, i choosed 2.1.2001 , correct write into db 1.1.2001, but if u read this from db, will be shown 1.1.2001
in jsp/jsf:
<t:inputCalendar id="employmentdate" monthYearRowClass="yearMonthHeader" weekRowClass="weekHeader" currentDayCellClass="currentDayCell" renderAsPopup="true" value="#{bean.attribute}" />
can u help me?
thanx
[591 byte] By [
oftskya] at [2007-11-27 10:42:28]

# 1
This could be any number of things; locale issues, time zone issues. Also, the issue could be the locale, time zone difference from client to web server or from application to database.
# 2
just use my desktop pc as server and client, tomcat ...
where can i check the issues?
# 3
I'd start by looking in a debugger to see exactly what values are being set on the date objects. Also, try to verify what is actually in the database with a separate database client. Make sure the database client is displaying the timezone. Keep in mind that what timezone you display the date as can change the day of the month. I'd also take a look at the value of the date object after pulling it from the database.
# 4
have seen , in mysql-database, if i write 10.07.07 into db, succeed in db ,
2007-07-10 00:00:00.0 in the data column of db. It could be the reason:2007-07-10 00:00:00.0 will be shown as 09.07.07, but how i can change this, in mysql or in jsp/jsf, let 2007-07-10 01:00:00.0 instead of 2007-07-10 00:00:00.0 be saved in db?
# 6
the same problem occur in my project
i look the myfaces calendar source ,
if not do it like this ,i will be impossible to implement the calendar.