I have been using the following code to print out the
date & time as part of a trace to a file.
The time being printed in Pacific Standard Time. Even
though the host computer time is Eastern Standard time.
Why is this ?
//format date & time
Date current_time = new Date();
SimpleDateFormat formatter = new SimpleDateFormat("dd'/'MM'/'yyyy HH':'mm':'ss'.'SSS");
//populate log_string with formatted trace message
log_string = formatter.format(current_time) + "|" +
component_name + "|" + log_message + "\n";