File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/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
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