aspose file tools
The moose likes Java in General and the fly likes Date problem on server Big Moose Saloon
  Search | Java FAQ | Recent Topics
Register / Login


JavaRanch » Java Forums » Java » Java in General
Reply Bookmark "Date problem on server" Watch "Date problem on server" New topic
Author

Date problem on server

Justin Howard
Ranch Hand

Joined: Feb 19, 2009
Posts: 162
Hi All,

I have a very simple function to get the current time as a string.


I am appending this value to the name of the person and create a file with theis filename.
It work perfectly fine when I deploy on my local tomcat.

But when I deploy it on the server Tomcat it returns nothing.


Thanks

Leandro Coutinho
Ranch Hand

Joined: Mar 04, 2009
Posts: 415
What time is it on the server?
Justin Howard
Ranch Hand

Joined: Feb 19, 2009
Posts: 162
Thanks for the reply.

When I echo the date and time in the dos prompt it returns the correct date and time.

Thanks

Leandro Coutinho
Ranch Hand

Joined: Mar 04, 2009
Posts: 415
Are you sure that the problem is in this method and not in other place?

What the code below prints?

Justin Howard
Ranch Hand

Joined: Feb 19, 2009
Posts: 162
I dont think there is a problem with the code either. When I print it out locally it returns correctly.
When I deploy the app on my local tomcat it returns the date correctly and appends the date correctly to the filename.

When I deploy it on the QA server the time does not append.

I am not sure what to look for.

Thanks
Paul Clapham
Bartender

Joined: Oct 14, 2005
Posts: 16487
    
    2

My suspicion is that the date code is working perfectly well but that you can't create the file due to the security configuration on the QA server (or for some other reason). But that's just a wild guess. To me "the time does not append" isn't a very clear description of the problem.
Justin Howard
Ranch Hand

Joined: Feb 19, 2009
Posts: 162
Thanks. I will defnitely look for any security configurations.

When I say time does not append, I mean



And then create a file with this name.
Locally it works correctly, eg: 40-30-2009_044005_name.did

Thanks

 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Date problem on server
 
Similar Threads
How to print default date in required format
Convert AWK script
How to convert String to Date
How to get month name
java.text.ParseException: Unparseable date