File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes Beginning Java and the fly likes incorrect time being displayed Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Beginning Java
Bookmark "incorrect time being displayed" Watch "incorrect time being displayed" New topic
Author

incorrect time being displayed

ralph roper
Greenhorn

Joined: Nov 25, 2001
Posts: 25
hi,
I have a java app that displays the time 1 hour later then the system time on a Solaris box. I have checked the code (which is pretty simple) on my NT workstation and it works fine.
Both machines are using Eastern Standard Time(EST) for the timezone. Anyone know the answer ?
thanks,
Ralph
Dirk Schreckmann
Sheriff

Joined: Dec 10, 2001
Posts: 7023
What are you doing to get, calculate, and display the time?


[How To Ask Good Questions] [JavaRanch FAQ Wiki] [JavaRanch Radio]
ralph roper
Greenhorn

Joined: Nov 25, 2001
Posts: 25
I am picking up the application from someone else. This is the code in question.
<code snippet>
private static final SimpleDateFormat timeFormatter =new SimpleDateFormat "HH:mm:ss:SSS" );
/**
*/
public final Date getTime()
{
return time;
}
public String toString()
{
StringBuffer s = new StringBuffer();
s.append(dateFormatter.format( time ))
.append(DELIM).append(timeFormatter.format( time ))
.append(DELIM).append(id);
return s.toString();
}
</code snippet>
I have a feeling this may be related to Solaris more so then the java code but at this stage I am not discounting anything. :roll:
thanks.
ralph roper
Greenhorn

Joined: Nov 25, 2001
Posts: 25
Looks like someone has posted a similar question back in Dec 2001. It now looks like it has more to do with iPlanet. I have logged a support call with SUN iPlanet support. Will post an update once I have the answer.
Dirk Schreckmann
Sheriff

Joined: Dec 10, 2001
Posts: 7023
Are you sure that the problem isn't where the time gets calculated?
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: incorrect time being displayed