0

Example

3:50 = this is time of GMT +2 and putted it in item of spinner by 24 hours.
4:20 TO 12:50

Thank you for sharing ideas.

JAL
  • 109
  • 6
  • 3
    where exactly is your problem? – Eveli Feb 08 '13 at 07:48
  • What are you trying to say ? could you be more specific ? – lokoko Feb 08 '13 at 07:55
  • If 3:50 is GMT +2 (which is actually 1:50 GMT) then what do 4:20 and 12:50 have to do with anything? Please search for time zone conversions here on stackoverflow or use Google. – Squonk Feb 08 '13 at 07:55
  • sorry for wrong sentence I compose... I mean 3:50, 4:20 to 12: 50 is the example only from the time. this 3:50, 4:20 to 12:50 is one of the item in the spinner . – JAL Feb 08 '13 at 08:15
  • I'm trying to say is how can I get the time (gmt + 2)? and display the time in the spinner . – JAL Feb 08 '13 at 08:16

1 Answers1

1

This will get you the curent hour and minute of the day in GMT+2

TimeZone timeZone = new TimeZone();
timeZone.setOffset(2);
Calendar calendar = Calendar.getInstance(timeZone);
int hour = calendar.get(Calendar.HOUR_OF_DAY);
int minute = calendar.get(Calendar.MINUTE);
Andy McSherry
  • 4,676
  • 3
  • 26
  • 36