23.11.2008, 23:42
my approach was similar to Badger's - I too simply added +1, only here:
public FixHour(hour)
{
hour = timeshift+hour+1;
if (hour < 0)
{
hour = hour+24;
}
else if (hour > 23)
{
hour = hour-24;
}
shifthour = hour;
return 1;
}
public FixHour(hour)
{
hour = timeshift+hour+1;
if (hour < 0)
{
hour = hour+24;
}
else if (hour > 23)
{
hour = hour-24;
}
shifthour = hour;
return 1;
}