This week's book giveaway is in the Android forum.
We're giving away four copies of Create an Uber Clone in 7 Days: Build a real world full stack mobile app in Java and have Shai Almog on-line!
See this thread for details.
Win a copy of Create an Uber Clone in 7 Days: Build a real world full stack mobile app in Java this week in the Android forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

Adding offset to time zone in java  RSS feed

 
Greenhorn
Posts: 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi all,

This is my first Post, regarding time zone conversion.

my requirement : i am getting date in string format here date is : "01/16/2013 6:00 PM". i need to trigger one job at this time. here user is in US(timezone : America/Regina[GMT -06:00]) and server is in INDIa(Asia/Calcutta[GMT +5:30]).

user assuming that the job is trigger at 01/16/2013 6:00 PM of his local time, for that i have to convert the us time in to IST and stored in the server to trigger the job in server.

here user selected time is : "01/16/2013 6:00 PM"
difference bt timezones : 11:30 hr ( India is 11:00 hr ahead)
so user time in server(IST) is : "01/17/2013 5:30 AM"

how to achive this functionality with a simple method which takes date as string and two timezones one is server and another one is user timezone.

please help me.

Thanks in advance..: )


 
Bartender
Posts: 1558
5
Eclipse IDE Java Linux
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,

Please check your private message for an important administrative matter. This is not optional.

Thanks.
 
Well don't expect me to do the dishes! This ad has been cleaned for your convenience:
Why should you try IntelliJ IDEA ?
https://coderanch.com/wiki/696337/IntelliJ-IDEA
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!