Convert Epoch seconds to date and time format in Java
In case you’re restricted to legacy java.util.Date and java.util.Calendar APIs, you need to take into account that the timestamps are interpreted in milliseconds, not seconds. So you first need to multiply it by 1000 to get the timestamp in milliseconds. long seconds = 1320105600; long millis = seconds * 1000; This way you can feed … Read more