Jesse Silverman wrote:
M Burke wrote:...
Yes Jesse, that worked. Thank you. I am on Java 7
Yikes!! I wouldn't recommend going to JODA date/time just to avoid Calendar/Date then, tho some would.
For curiosity's sake, since a lot of people like saying at Conferences, "I think we can ALL agree everyone is using at least Java 8, now" with a grin, do you have specific dependencies blocking you from Java 8 or just "Time, time!"?? I've been working to make Java 11 my "new normal" before Java 17 comes crashing down on us...
Jesse Silverman wrote:Tho attempting to avoid Calendar in all new code I write, I note the following from SimpleDateFormat JavaDocs:
H Hour in day (0-23) Number 0
k Hour in day (1-24) Number 24
K Hour in am/pm (0-11) Number 0
h Hour in am/pm (1-12) Number 12
Do you see what I see?
Would changing to:
"yyyy-MM-dd HH:mm:ss" help cure what is ailing you?