2

What is the fastest/most efficient way of converting epoch time to a datetime string, for example a ISO-8601 datetime (one format: 2015-10-25T22:34:51+00:00) String?

I know that I can use java.util.Date as explained in Converting Epoch time to date string but is it actually the fastest?

I am interested in this because I have tens of thousands to millions of epochs to convert to String form periodically.

Community
  • 1
  • 1
heikkim
  • 2,955
  • 2
  • 24
  • 34
  • 1
    which different ways have you tried? did you benchmarked the different options?? – Jordi Castilla Oct 29 '15 at 09:34
  • 1
    It is very fast, yes. Try it and see. When you are convinced after measuring that this approach is too slow, then ponder about alternatives. – Zoltán Oct 29 '15 at 09:36
  • try to test it by converting millions dates and see if the time performance is acceptable for your application. If it is, than there is not need to ponder alot on it. – ata Oct 29 '15 at 09:41

0 Answers0