summaryrefslogtreecommitdiff
path: root/fpdfsdk/javascript/JS_Value.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'fpdfsdk/javascript/JS_Value.cpp')
-rw-r--r--fpdfsdk/javascript/JS_Value.cpp10
1 files changed, 5 insertions, 5 deletions
diff --git a/fpdfsdk/javascript/JS_Value.cpp b/fpdfsdk/javascript/JS_Value.cpp
index 1da1525d09..5e403a524b 100644
--- a/fpdfsdk/javascript/JS_Value.cpp
+++ b/fpdfsdk/javascript/JS_Value.cpp
@@ -778,15 +778,15 @@ int JS_GetDayFromTime(double dt) {
}
int JS_GetHourFromTime(double dt) {
- return (int)_Mod(FXSYS_floor((double)(dt / (60 * 60 * 1000))), 24);
+ return (int)_Mod(floor(dt / (60 * 60 * 1000)), 24);
}
int JS_GetMinFromTime(double dt) {
- return (int)_Mod(FXSYS_floor((double)(dt / (60 * 1000))), 60);
+ return (int)_Mod(floor(dt / (60 * 1000)), 60);
}
int JS_GetSecFromTime(double dt) {
- return (int)_Mod(FXSYS_floor((double)(dt / 1000)), 60);
+ return (int)_Mod(floor(dt / 1000), 60);
}
double JS_DateParse(const wchar_t* str) {
@@ -820,7 +820,7 @@ double JS_DateParse(const wchar_t* str) {
double date = v->ToNumber(context).ToLocalChecked()->Value();
if (!_isfinite(date))
return date;
- return date + _getLocalTZA() + _getDaylightSavingTA(date);
+ return JS_LocalTime(date);
}
}
}
@@ -869,7 +869,7 @@ bool JS_PortIsNan(double d) {
}
double JS_LocalTime(double d) {
- return JS_GetDateTime() + _getDaylightSavingTA(d);
+ return d + _getLocalTZA() + _getDaylightSavingTA(d);
}
std::vector<CJS_Value> JS_ExpandKeywordParams(