Win a copy of The Little Book of Impediments (e-book only) this week in the Agile and Other Processes forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Timezone problem

 
pramodh somashekara
Ranch Hand
Posts: 62
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
hi, we have a web application running across different timezones in different countries. but we have a calculation which is sensitive to timezone from where user is trying to access the applications.
So how to implement this feature without affecting timezone of the user.

thanks in advance...
 
Seetharaman Venkatasamy
Ranch Hand
Posts: 5575
Eclipse IDE Java Windows XP
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
i can not get you from what your given statement but,

i can give you that how to calculate time according to the time zone
 
Jesper de Jong
Java Cowboy
Saloon Keeper
Posts: 15644
47
Android IntelliJ IDE Java Scala Spring
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Your question is quite vague and general, so it is hard to give you a specific answer. Keep the following in mind:

Class java.util.Date doesn't know anything about timezones. A Date object refers to a specific instance in time and is stored as the number of milliseconds since 1 January 1970, 12:00 AM UTC.

When you format a Date object for display using for example a java.text.SimpleDateFormat object, then you can set the timezone on the SimpleDateFormat object to determine in which time zone you want the date to be displayed.
 
pramodh somashekara
Ranch Hand
Posts: 62
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
ok. let me give some more information - we have an online application running in Australia, US & europe. There is end of day operations which has to be run by USERS at the end of business hours i.e. 6 PM local time of each country and we have to restrict start of operation after 7 PM local time.
Considering that application is installed only in US, how to implement this scenario.
 
Seetharaman Venkatasamy
Ranch Hand
Posts: 5575
Eclipse IDE Java Windows XP
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Originally posted by pramodh somashekara:
how to implement this scenario


get the current time according to the timezone . i given example above .. you need to know time zone key
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic