forked from github/dataease
Merge pull request #12172 from dataease/pr@dev-v2@fix_date
fix: 尝试修复日期过滤存在时区差异的问题
This commit is contained in:
commit
a24f1eb7c6
@ -182,8 +182,11 @@ public class CustomWhere2Str {
|
||||
whereValue = String.format(SQLConstants.WHERE_BETWEEN, Utils.transLong2Str(stringLongMap.get("startTime")), Utils.transLong2Str(stringLongMap.get("endTime")));
|
||||
}
|
||||
} else {
|
||||
long ts = Utils.allDateFormat2Long(value);
|
||||
if (isCross) {
|
||||
value = Utils.allDateFormat2Long(value) + "";
|
||||
value = ts + "";
|
||||
} else {
|
||||
value = Utils.transLong2Str(ts);
|
||||
}
|
||||
whereValue = String.format(SQLConstants.WHERE_VALUE_VALUE, value);
|
||||
}
|
||||
|
@ -192,8 +192,11 @@ public class WhereTree2Str {
|
||||
whereValue = String.format(SQLConstants.WHERE_BETWEEN, Utils.transLong2Str(stringLongMap.get("startTime")), Utils.transLong2Str(stringLongMap.get("endTime")));
|
||||
}
|
||||
} else {
|
||||
long ts = Utils.allDateFormat2Long(value);
|
||||
if (isCross) {
|
||||
value = Utils.allDateFormat2Long(value) + "";
|
||||
value = ts + "";
|
||||
} else {
|
||||
value = Utils.transLong2Str(ts);
|
||||
}
|
||||
whereValue = String.format(SQLConstants.WHERE_VALUE_VALUE, value);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user