[gnote] Switch fileinfo from sharp::DateTime to Glib::DateTime
- From: Aurimas Černius <aurimasc src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnote] Switch fileinfo from sharp::DateTime to Glib::DateTime
- Date: Sat, 25 Jan 2020 13:43:14 +0000 (UTC)
commit 7a38ee7f2dafec4003e65e3730b70227abd6e0c4
Author: Aurimas Černius <aurisc4 gmail com>
Date: Sat Jan 25 15:42:29 2020 +0200
Switch fileinfo from sharp::DateTime to Glib::DateTime
src/sharp/fileinfo.cpp | 8 ++++----
src/sharp/fileinfo.hpp | 4 ++--
2 files changed, 6 insertions(+), 6 deletions(-)
---
diff --git a/src/sharp/fileinfo.cpp b/src/sharp/fileinfo.cpp
index 9983b32d..b56baa3f 100644
--- a/src/sharp/fileinfo.cpp
+++ b/src/sharp/fileinfo.cpp
@@ -1,7 +1,7 @@
/*
* gnote
*
- * Copyright (C) 2011-2012,2017 Aurimas Cernius
+ * Copyright (C) 2011-2012,2017,2020 Aurimas Cernius
* Copyright (C) 2009 Hubert Figuiere
*
* Permission is hereby granted, free of charge, to any person obtaining a
@@ -57,12 +57,12 @@ namespace sharp {
}
- DateTime file_modification_time(const Glib::ustring &path)
+ Glib::DateTime file_modification_time(const Glib::ustring &path)
{
Glib::RefPtr<Gio::FileInfo> file_info = Gio::File::create_for_path(path)->query_info(
G_FILE_ATTRIBUTE_TIME_MODIFIED + Glib::ustring(",") + G_FILE_ATTRIBUTE_TIME_MODIFIED_USEC);
if(file_info)
- return DateTime(file_info->modification_time());
- return DateTime();
+ return Glib::DateTime::create_now_local(file_info->modification_time());
+ return Glib::DateTime();
}
}
diff --git a/src/sharp/fileinfo.hpp b/src/sharp/fileinfo.hpp
index e4d15ff3..6bf19a21 100644
--- a/src/sharp/fileinfo.hpp
+++ b/src/sharp/fileinfo.hpp
@@ -1,7 +1,7 @@
/*
* gnote
*
- * Copyright (C) 2011-2012,2017 Aurimas Cernius
+ * Copyright (C) 2011-2012,2017,2020 Aurimas Cernius
* Copyright (C) 2009 Hubert Figuiere
*
* Permission is hereby granted, free of charge, to any person obtaining a
@@ -46,7 +46,7 @@ private:
};
-DateTime file_modification_time(const Glib::ustring &);
+Glib::DateTime file_modification_time(const Glib::ustring &);
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]