T
The One
Hi,
I am working on a module which has to check the current time. If the
time is within the bounds then the system performs further steps.
I have to use the Eastern std. Time as the base time for the
validation.
Here is the sample code:
TimeZone myTimeZone = TimeZone.getTimeZone("EST");
Calendar calendar = Calendar.getInstance();
int iHour = calendar.get(Calendar.HOUR_OF_DAY);
System.out.print(iHour);
//Time between 8 AM and 8PM EST
if (iHour > 8 & iHour < 20)
{
Go Ahead
}
This code doesn't seem to work correctly.
Can anybody help me out ?
Thanks
Dave
I am working on a module which has to check the current time. If the
time is within the bounds then the system performs further steps.
I have to use the Eastern std. Time as the base time for the
validation.
Here is the sample code:
TimeZone myTimeZone = TimeZone.getTimeZone("EST");
Calendar calendar = Calendar.getInstance();
int iHour = calendar.get(Calendar.HOUR_OF_DAY);
System.out.print(iHour);
//Time between 8 AM and 8PM EST
if (iHour > 8 & iHour < 20)
{
Go Ahead
}
This code doesn't seem to work correctly.
Can anybody help me out ?
Thanks
Dave