Compare commits
3 Commits
40cd04f9dd
...
aff239377d
Author | SHA1 | Date | |
---|---|---|---|
aff239377d | |||
3aaa1b0350 | |||
823a4ae189 |
@ -3,6 +3,7 @@
|
|||||||
#include <imgui/imgui.h>
|
#include <imgui/imgui.h>
|
||||||
|
|
||||||
#include <chrono>
|
#include <chrono>
|
||||||
|
#include <string>
|
||||||
#include <iostream>
|
#include <iostream>
|
||||||
#include <vector>
|
#include <vector>
|
||||||
|
|
||||||
@ -182,7 +183,13 @@ void FileSelector::render(void) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (ImGui::TableNextColumn()) {
|
if (ImGui::TableNextColumn()) {
|
||||||
const auto ctime = std::chrono::system_clock::to_time_t(dir_entry.last_write_time() - decltype(dir_entry.last_write_time())::clock::now() + std::chrono::system_clock::now());
|
const auto file_time_converted = std::chrono::time_point_cast<std::chrono::system_clock::duration>(
|
||||||
|
dir_entry.last_write_time()
|
||||||
|
- decltype(dir_entry.last_write_time())::clock::now()
|
||||||
|
+ std::chrono::system_clock::now()
|
||||||
|
);
|
||||||
|
const auto ctime = std::chrono::system_clock::to_time_t(file_time_converted);
|
||||||
|
|
||||||
const auto ltime = std::localtime(&ctime);
|
const auto ltime = std::localtime(&ctime);
|
||||||
ImGui::TextDisabled("%2d.%2d.%2d - %2d:%2d", ltime->tm_mday, ltime->tm_mon, ltime->tm_year + 1900, ltime->tm_hour, ltime->tm_min);
|
ImGui::TextDisabled("%2d.%2d.%2d - %2d:%2d", ltime->tm_mday, ltime->tm_mon, ltime->tm_year + 1900, ltime->tm_hour, ltime->tm_min);
|
||||||
}
|
}
|
||||||
@ -207,7 +214,13 @@ void FileSelector::render(void) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (ImGui::TableNextColumn()) {
|
if (ImGui::TableNextColumn()) {
|
||||||
const auto ctime = std::chrono::system_clock::to_time_t(dir_entry.last_write_time() - decltype(dir_entry.last_write_time())::clock::now() + std::chrono::system_clock::now());
|
const auto file_time_converted = std::chrono::time_point_cast<std::chrono::system_clock::duration>(
|
||||||
|
dir_entry.last_write_time()
|
||||||
|
- decltype(dir_entry.last_write_time())::clock::now()
|
||||||
|
+ std::chrono::system_clock::now()
|
||||||
|
);
|
||||||
|
const auto ctime = std::chrono::system_clock::to_time_t(file_time_converted);
|
||||||
|
|
||||||
const auto ltime = std::localtime(&ctime);
|
const auto ltime = std::localtime(&ctime);
|
||||||
ImGui::TextDisabled("%2d.%2d.%2d - %2d:%2d", ltime->tm_mday, ltime->tm_mon, ltime->tm_year + 1900, ltime->tm_hour, ltime->tm_min);
|
ImGui::TextDisabled("%2d.%2d.%2d - %2d:%2d", ltime->tm_mday, ltime->tm_mon, ltime->tm_year + 1900, ltime->tm_hour, ltime->tm_min);
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user