• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

Timezone problem

 
Ranch Hand
Posts: 62
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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...
 
Ranch Hand
Posts: 5575
Eclipse IDE Windows XP Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
 
Java Cowboy
Posts: 16084
88
Android Scala IntelliJ IDE Spring Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
    Number of slices to send:
    Optional 'thank-you' note:
  • 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 Windows XP Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
reply
    Bookmark Topic Watch Topic
  • New Topic