Fix epoch calculation, verified by @ppsspp213

This commit is contained in:
TwistedUmbrella 2014-02-20 16:40:58 -05:00
parent 8655cae995
commit b82b965a96
1 changed files with 2 additions and 2 deletions

View File

@ -4,13 +4,13 @@ import java.util.Calendar;
public class DreamTime {
private static long dreamRTC = ((20 * 365 + 5) * 86400);
private static long dreamRTC = ((20 * 365 + 5) * 86400) - 1;
public static long getDreamtime() {
Calendar cal = Calendar.getInstance();
int utcOffset = cal.get(Calendar.ZONE_OFFSET)
+ cal.get(Calendar.DST_OFFSET);
return (System.currentTimeMillis() / 1000) + dreamRTC
+ utcOffset / 1000;
+ (utcOffset / 1000);
}
}