Quantcast
Channel: PTC Community: Message List - Windchill
Viewing all articles
Browse latest Browse all 8876

Re: Timestamps in MethodServer Log Files

$
0
0

So Jess,

Instead of this:

    try(java.io.PrintWriter output = new java.io.PrintWriter(new java.io.BufferedWriter(new java.io.FileWriter("/home/ptc/QuickLinks.log", true)))) {        output.println(new java.sql.Timestamp(System.currentTimeMillis()) + "\t" + currentUser.getName());    } catch (java.io.IOException e2) {        e2.printStackTrace();    }

 

What do you suggest to write the timestamp to my file "/home/ptc/QuickLinks.log" in the timezone of the server, instead of GMT?

 

Sorry if it is simple question - I'm still somewhat novice at java coding.


Viewing all articles
Browse latest Browse all 8876

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>