Skip to content

Commit

Permalink
Removed windows specific date formats. Refs #8126.
Browse files Browse the repository at this point in the history
  • Loading branch information
jawrainey committed Oct 28, 2013
1 parent fc2511f commit 9f47d0c
Showing 1 changed file with 4 additions and 5 deletions.
9 changes: 4 additions & 5 deletions Code/Mantid/Framework/ICat/src/ICat4/ICat4Catalog.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -127,20 +127,19 @@ namespace Mantid
bool queryDataset = false;

// Format the timestamps in order to compare them.
std::string startDate;
std::string endDate;
std::string startDate = formatDateTime(inputs.getStartDate() + 60*60, "%Y-%m-%d %H:%M:%S"); // 2 hours
std::string endDate = formatDateTime(inputs.getEndDate() + (24*60*60) + (59*60) + 59, "%Y-%m-%d %H:%M:%S"); // A day, 59 mins & 59 secs.


// Investigation startDate if endDate is not selected
if (inputs.getStartDate() != 0 && inputs.getEndDate() == 0)
{
startDate = formatDateTime(inputs.getStartDate(), "%F %T");
investigationWhere.push_back("startDate >= '" + startDate + "'");
}

// Investigation endDate if startdate is not selected
if (inputs.getEndDate() != 0 && inputs.getStartDate() == 0)
{
endDate = formatDateTime(inputs.getEndDate(), "%F %T");
investigationWhere.push_back("endDate <= '" + endDate + "'");
}

Expand Down Expand Up @@ -514,7 +513,7 @@ namespace Mantid
savetoTableWorkspace(datafile->name, table);
savetoTableWorkspace(datafile->location, table);

std::string createDate = formatDateTime(*datafile->createTime, "%F %T");
std::string createDate = formatDateTime(*datafile->createTime, "%Y-%m-%d %H:%M:%S");
savetoTableWorkspace(&createDate, table);

savetoTableWorkspace(datafile->id, table);
Expand Down

0 comments on commit 9f47d0c

Please sign in to comment.