diff --git a/.idea/runConfigurations/ProjectExplorer.xml b/.idea/runConfigurations/ProjectExplorer.xml new file mode 100644 index 0000000000..1bc63de00b --- /dev/null +++ b/.idea/runConfigurations/ProjectExplorer.xml @@ -0,0 +1,20 @@ + + + + \ No newline at end of file diff --git a/src/main/java/net/sf/mpxj/mpp/ProjectPropertiesReader.java b/src/main/java/net/sf/mpxj/mpp/ProjectPropertiesReader.java index 9d46cdb781..b834c6fa75 100644 --- a/src/main/java/net/sf/mpxj/mpp/ProjectPropertiesReader.java +++ b/src/main/java/net/sf/mpxj/mpp/ProjectPropertiesReader.java @@ -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; @@ -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(); }