Using wxInvalidDatetime does not get along with debug builds. Using 1/1/1970 instead.

This commit is contained in:
arcum42 2018-09-15 03:52:41 -07:00
parent 577bfaa8cd
commit e9ae9cacd8
1 changed files with 4 additions and 4 deletions

View File

@ -32,7 +32,7 @@ public:
{
slot_num = 0;
empty = true;
updated = wxInvalidDateTime;
updated = wxDateTime(1, wxDateTime::Jan, 1970);
crc = ElfCRC;
}
@ -40,7 +40,7 @@ public:
{
slot_num = i;
empty = true;
updated = wxInvalidDateTime;
updated = wxDateTime(1, wxDateTime::Jan, 1970);
crc = ElfCRC;
}
@ -51,7 +51,7 @@ public:
wxDateTime GetTimestamp()
{
if (!isUsed()) return wxInvalidDateTime;
if (!isUsed()) return wxDateTime(1, wxDateTime::Jan, 1970);
return wxDateTime(wxFileModificationTime(SaveStateBase::GetFilename(slot_num)));
}
@ -67,7 +67,7 @@ public:
{
if (empty) return wxsFormat(_("Slot %d - Empty"), slot_num);
if (updated != wxInvalidDateTime) return wxsFormat(_("Slot %d - %s %s"), slot_num, updated.FormatDate(), updated.FormatTime());
if (updated != wxDateTime(1, wxDateTime::Jan, 1970)) return wxsFormat(_("Slot %d - %s %s"), slot_num, updated.FormatDate(), updated.FormatTime());
return wxsFormat(_("Slot %d - Unknown Time"), slot_num);
}