views:

28

answers:

2

I'd like to add 15 minutes to Time Object, so that 09:46 would become 10:01.

 Time time = new Time();
 time.hours = 9;
 time.minutes = 46;
 time.minute += 15;

This doesn't work... :-/

+1  A: 

Take a look at Joda Time

bassfriend
seems like a useful alternative! thanks for the hint :)
cody
+1  A: 

In what way does it not work?

If the problem is you're ending up with 61 minutes, you should call Time.normalize(boolean ignoreDst) to fix it.

oli
Ok that did it, thanks! :)
cody