# ganesh gowthaman

Greenhorn
since Nov 25, 2009
For More
Cows and Likes
Cows
0
In last 30 days
0
Total given
0
Likes
0
Received in last 30 days
0
Total given
0
Given in last 30 days
0
Scavenger Hunt
Ranch Hand Scavenger Hunt
Greenhorn Scavenger Hunt

## Recent posts by ganesh gowthaman

I am sorry..

I meant

Calendar c = Calendar.getInstance(TimeZone.getTimeZone("EST"));

c.get(Calendar.HOUR_OF_DAY) returns 1 for the above scenario where the actual hour (as per the current timezone which is EST) is 16 and it returned 0 when the time was 15hours.

My question is what math will help me to get 16 from 1 or 15 from 0?

I hope i am clear!!!

14 years ago
Hi there,

System.out.println(Calendar.getInstance(TimeZone.getTimeZone("EST")));

gives

java.util.GregorianCalendar[time=1271917105506,areFieldsSet=true,areAllFieldsSet=true,lenient=true,zone=sun.util.calendar.ZoneInfo[id="EST",offset=-18000000,dstSavings=0,useDaylight=false,transitions=0,lastRule=null],firstDayOfWeek=1,minimalDaysInFirstWeek=1,ERA=1,YEAR=2010,MONTH=3,WEEK_OF_YEAR=17,WEEK_OF_MONTH=4,DAY_OF_MONTH=22,DAY_OF_YEAR=112,DAY_OF_WEEK=5,DAY_OF_WEEK_IN_MONTH=4,AM_PM=0,HOUR=1,HOUR_OF_DAY=1,MINUTE=18,SECOND=25,MILLISECOND=506,ZONE_OFFSET=-18000000,DST_OFFSET=0]

Current time is Thu Apr 22 16:18:25 EST 2010

But Calendar.HOUR_OF_DAY return 1
Looks like something to do with OFFSET, GMT...

I want to schedule a task when the clock strikes 10AM next.
I know i should use add or set of Calendar. But how to get the correct current hours?

14 years ago
hi,

i am a newbie to spring..

i am trying to display a jsp page from simpleformcontroller & if user enters invalid data, the same jsp should be displayed with a error message.

when i enter invalid data & click on submit am getting :
SEVERE: Neither BindingResult nor plain target object for bean name 'LoginCommand' available as request attribute
java.lang.IllegalStateException: Neither BindingResult nor plain target object for bean name 'LoginCommand' available as request attribute

Btw, successView is working fine...