Skip to content

Commit

Permalink
Revert "Tidy up timestamp conversion"
Browse files Browse the repository at this point in the history
This reverts commit ec22d0c.
  • Loading branch information
joniles committed Oct 31, 2024
1 parent ec22d0c commit 0855476
Show file tree
Hide file tree
Showing 2 changed files with 24 additions and 2 deletions.
20 changes: 20 additions & 0 deletions .idea/runConfigurations/ProjectExplorer.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 4 additions & 2 deletions src/main/java/net/sf/mpxj/mpp/ProjectPropertiesReader.java
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,6 @@
import java.util.Calendar;
import java.util.Date;
import java.util.Map;
import java.util.TimeZone;
import java.util.TreeMap;

import net.sf.mpxj.common.DayOfWeekHelper;
Expand Down Expand Up @@ -243,6 +242,9 @@ private LocalDateTime getLocalDateTime(Date date)
return null;
}

return LocalDateTime.ofInstant(date.toInstant(), TimeZone.getDefault().toZoneId());
m_calendar.setTime(date);
return LocalDateTime.of(m_calendar.get(Calendar.YEAR), m_calendar.get(Calendar.MONTH) + 1, m_calendar.get(Calendar.DAY_OF_MONTH), m_calendar.get(Calendar.HOUR_OF_DAY), m_calendar.get(Calendar.MINUTE), m_calendar.get(Calendar.SECOND));
}

private final Calendar m_calendar = Calendar.getInstance();
}

0 comments on commit 0855476

Please sign in to comment.