Skip to content

Commit

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

This file was deleted.

6 changes: 2 additions & 4 deletions src/main/java/net/sf/mpxj/mpp/ProjectPropertiesReader.java
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@
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 @@ -242,9 +243,6 @@ private LocalDateTime getLocalDateTime(Date date)
return null;
}

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));
return LocalDateTime.ofInstant(date.toInstant(), TimeZone.getDefault().toZoneId());
}

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

0 comments on commit ec22d0c

Please sign in to comment.