summaryrefslogtreecommitdiff
path: root/fpdfsdk
diff options
context:
space:
mode:
Diffstat (limited to 'fpdfsdk')
-rw-r--r--fpdfsdk/cpdfsdk_datetime.cpp2
-rw-r--r--fpdfsdk/fpdf_editpage.cpp9
2 files changed, 3 insertions, 8 deletions
diff --git a/fpdfsdk/cpdfsdk_datetime.cpp b/fpdfsdk/cpdfsdk_datetime.cpp
index 332ae8e62e..f0d50911aa 100644
--- a/fpdfsdk/cpdfsdk_datetime.cpp
+++ b/fpdfsdk/cpdfsdk_datetime.cpp
@@ -93,7 +93,7 @@ void CPDFSDK_DateTime::ResetDateTime() {
tzset();
time_t curTime;
- time(&curTime);
+ FXSYS_time(&curTime);
struct tm* newtime = localtime(&curTime);
m_year = newtime->tm_year + 1900;
diff --git a/fpdfsdk/fpdf_editpage.cpp b/fpdfsdk/fpdf_editpage.cpp
index f1dbf70192..438a0624f3 100644
--- a/fpdfsdk/fpdf_editpage.cpp
+++ b/fpdfsdk/fpdf_editpage.cpp
@@ -26,6 +26,7 @@
#include "core/fpdfapi/parser/cpdf_string.h"
#include "core/fpdfdoc/cpdf_annot.h"
#include "core/fpdfdoc/cpdf_annotlist.h"
+#include "core/fxcrt/fx_extension.h"
#include "fpdfsdk/cpdfsdk_helpers.h"
#include "public/fpdf_formfill.h"
#include "third_party/base/logging.h"
@@ -36,12 +37,6 @@
#include "fpdfsdk/fpdfxfa/cpdfxfa_page.h"
#endif // PDF_ENABLE_XFA
-#if _FX_OS_ == _FX_OS_ANDROID_
-#include <time.h>
-#else
-#include <ctime>
-#endif
-
namespace {
static_assert(FPDF_PAGEOBJ_TEXT == CPDF_PageObject::TEXT,
@@ -166,7 +161,7 @@ FPDF_EXPORT FPDF_DOCUMENT FPDF_CALLCONV FPDF_CreateNewDocument() {
time_t currentTime;
ByteString DateStr;
if (FSDK_IsSandBoxPolicyEnabled(FPDF_POLICY_MACHINETIME_ACCESS)) {
- if (time(&currentTime) != -1) {
+ if (FXSYS_time(&currentTime) != -1) {
tm* pTM = localtime(&currentTime);
if (pTM) {
DateStr = ByteString::Format(