IL PROTECTED]>
Sent: giovedì 23 marzo 2000 15.54
Subject: Re: Problem with date and time
Hi Federico, try this code:
Date data = new Date();
Calendar now = Calendar.getInstance();
int hours = data.getHours();
int min = data.getMinutes();
Hi Federico, try this code:
Date data = new Date();
Calendar now = Calendar.getInstance();
int hours = data.getHours();
int min = data.getMinutes();
int year = now.get(Calendar.YEAR);
int month = now.get(Calendar.MONTH)+1;
in
Check your machine time zone settings.
type "echo $TZ" at command prompt. The time zone value is added to the
system time when you get time from servlet. I think that is the reason.
Ravi
Federico Delpino wrote:
> Hi all,
> I faced a problem with time displayed by a servlet
> running on
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 =
hi,
i tested this with a servletrunner and ofcourse as an application,
it gives same time
ravi
Federico Delpino wrote:
> Hi all, I have a problem using dates in servlets. The
> following code
>
> =
> Calendar now = Calendar.getInstance();
> String date = now.get(Calendar.DATE) +
>
]]
Sent: Wednesday, October 27, 1999 12:48 PM
To: [EMAIL PROTECTED]
Subject: Problem with date
Hi all, I have a problem using dates in servlets. The
following code
=
Calendar now = Calendar.getInstance();
String date = now.get(Calendar.DATE) +
"/" + (now.get(Calendar
t: Wednesday, October 27, 1999 5:48 AM
Subject: Problem with date
> Hi all, I have a problem using dates in servlets. The
> following code
>
> =
> Calendar now = Calendar.getInstance();
> String date = now.get(Calendar.DATE) +
>
Hi all, I have a problem using dates in servlets. The
following code
=
Calendar now = Calendar.getInstance();
String date = now.get(Calendar.DATE) +
"/" + (now.get(Calendar.MONTH) +1) +
"/" + now.get(Calendar.YEAR) +
" " + now.get(Calendar.HOUR_OF_