java - How to get human readable date with unix time stamp in milliseconds? -


this question has answer here:

is there solution without using date class deprecated, , without having specify format in simpledateformat("yyyy-mm-dd hh:mm:ss.sss"), since want readable format? thanks

the date class isn't deprecated - many of constructors/methods are.

you can still use:

string text = new date(millissinceepoch).tostring(); 

you can't change string format - use system default time zone, example - may enough you.

personally i'd still use either simpledateformat or better yet java.time or joda time, if really don't want that, might enough.


Comments

Popular posts from this blog

single sign on - Logging into Plone site with credentials passed through HTTP -

php - Why does AJAX not process login form? -

java - How to specify maven bin in eclipse maven plugin? -