• Post Reply Bookmark Topic Watch Topic
  • New Topic

How to create Time and Convert from EST to IST, UK and AUS Time  RSS feed

 
Ranch Hand
Posts: 102
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
hi all
I am creating a List box. That I want to fill with time starting from 00:00 to 23:45 in the interval of 15 minute like 00:00 then next 00:15 then 00:30 and so on. Is there any method in Java where I can add 15 minute in a time.
like if start time: 00:00
addTime(start time + 00:15) like this;
Then I would like to convert selected time from List box to IST, UK and AUS time. Is this time conversion possible in Java.
Any one who know How to do it.
Thanx in Advance
 
Ranch Hand
Posts: 3451
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
For the first part of your problem you can set a constant to fifteen minutes and loop and increment for all your values. The constant might look like this:

For the second part, take a look at the API docs on java.util.Calendar and java.util.Timezone. That should help you do what you want.
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!