aspose file tools*
The moose likes Servlets and the fly likes Time Zone Specific Problem In Servlet Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of EJB 3 in Action this week in the EJB and other Java EE Technologies forum!
JavaRanch » Java Forums » Java » Servlets
Bookmark "Time Zone Specific Problem In Servlet" Watch "Time Zone Specific Problem In Servlet" New topic
Author

Time Zone Specific Problem In Servlet

Vikas Aggarwal
Ranch Hand

Joined: Jun 22, 2001
Posts: 140
A user on some timezone (say "A") comes to one of my forms and fills a date and time in somne format (Say "mm-dd-yyyy format"). This date and time must be greater than the current date and time. The server recieving the requests is running on some timezone (say "B"). A script running on the same server should fire off an email to the user on the user prefilled date and time. But the timezones of the user and the server are different so how can I program the script to send the email at the correct date and time.


Vikas Aggarwal

Founder @
Leads and Deals Limited

www.LeadsAndDeals.com
Pat Wallwork
Ranch Hand

Joined: Sep 23, 2001
Posts: 72
Hi,
I'm a little confused with your question but I had to do some stuff with the TimeZone class myself and this might help:

This will format the current date and time whereever your server is to be displayed like this:
Fri, Oct.04/02 at 11:17 PM
which is EST in New York.
You can use the method getAvailableIDs() to find the timezone you will want.
Hope this helps,
-Pat
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Time Zone Specific Problem In Servlet
 
Similar Threads
Date problem
want client's time zone from server side
want client's time zone from server side
Help with System Time
Convert Date from one timezone to another