I have a table that has country timezone range e.g.
Country: Canada Start Range: -3.5 End Range: -8.0
I have a method that pulls back the start and end range values from the table I need to convert the system time (UTC) to the country time range. If I was dealing with whole numbers it would be fine, and would just use the Calendar add regular methods that take int values but my method return doubles
I have:
private Calendar[] setCountryTime( double startRange double endRange) {
Calendar[] clientTimeRange = null;
Date today = new Date();
Calendar cal = Calendar.getInstance();
cal.setTime(today);
Calendar clientStartRange = getCurrentServerTime();
clientStartRange.add(Calendar.HOUR_OF_DAY, //what value here);
clientStartRange.add(Calendar.MINUTE, //what value here);
clientTimeRange[0] = clientStartRange;
Calendar clientEndRange = getCurrentServerTime();
clientEndRange.add(Calendar.HOUR_OF_DAY, //what value here);
clientEndRange.add(Calendar.MINUTE, //what value here);
clientTimeRange[1] = clientEndRange ;
return clientTimeRange;
}