I'm trying to do some simple client side date manipulation in Java. It's stored in UTC down to the millisecond, but for client side display I would like to truncate it to the second and display it in PST.
Currently, I'm getting the time from the db as a string like so:
myDataSet.someDate = resultSet.getString("some_date"));
I was thinking that I get some sort of Time object, manipulate it so it displays in the format I want and then wrap it in a string for display purposes. Here's what I have so far.
myDataSet.someDate = String.valueOf(resultSet.getTimestamp("some_date"));
This gets me the string, but the time is not in the correct form. I've found a few answers, but they all seem to want me to write another function. This seems like something I should be able to do in one line of code.