I want to develop a java application for converting indian time to any world time. I also want to include the daylight saving also. Can anyone please tell me the algorithm to convert indian time to world time?

A Date object always stores the date in UTC. When you then display that date (such as with toString) then the date/time will be displayed in the systems default timezone. If you wish to display it in a different timezone, or import a string as a date as if it were from a different timezone, then see the API docs for SimpleDateFormat, its parse and format methods, and its setTimezone method. Remember, however, that the Date object itself is always in UTC and only when you produce a String representation of that Date, does the timezone "influence" take place, and then only in that String representation.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.