Hi all,
         I faced a problem with time displayed by a servlet
running on my system
The servlet gets and display date/time using the following
code:
................
           Calendar now = Calendar.getInstance();
           int month = now.get(Calendar.MONTH) +1;

           String date = now.get(Calendar.DATE) +
                                   "/" + month +
                                           "/" +
now.get(Calendar.YEAR) +
                                   " " +
now.get(Calendar.HOUR_OF_DAY)+
                                   ":" +
now.get(Calendar.MINUTE)+
                       ":" + now.get(Calendar.SECOND);
.................
The date time displayed is quite wrong (3.5 hours after the
system time), example
the servlet says
23/3/2000 13:38:46
while the system time (issuing the date command line) is:
Thu Mar 23 10:08:49 MET 2000.
System info: Unix-Alpha system - Apache+Jserv - JDK 1.1.7.
Does any one help me?
Thanks in advance
               federico

------------------------------------------------------------
------
Federico Delpino                       Tel. 39-51-20-95722
Osservatorio Astronomico di Bologna    Fax. 39-51-20-95700
via Ranzani,1 - 40126 Bologna, Italy   e-mail:
[EMAIL PROTECTED]

BEGIN:VCARD
VERSION:2.1
N:;Delpino;Federico
FN:Delpino Federico
EMAIL;PREF;INTERNET:[EMAIL PROTECTED]
REV:20000323T091508Z
END:VCARD

Reply via email to