[TD-3601]<hotfix>: fix early 1970 time problem
This commit is contained in:
parent
77e3675640
commit
e2e88b2e95
|
@ -17,7 +17,7 @@
|
||||||
#define TSDB_MAX_SUBBLOCKS 8
|
#define TSDB_MAX_SUBBLOCKS 8
|
||||||
static FORCE_INLINE int TSDB_KEY_FID(TSKEY key, int32_t days, int8_t precision) {
|
static FORCE_INLINE int TSDB_KEY_FID(TSKEY key, int32_t days, int8_t precision) {
|
||||||
if (key < 0) {
|
if (key < 0) {
|
||||||
return (int)((key + 1) / tsMsPerDay[precision] / days + 1);
|
return (int)((key + 1) / tsMsPerDay[precision] / days - 1);
|
||||||
} else {
|
} else {
|
||||||
return (int)((key / tsMsPerDay[precision] / days));
|
return (int)((key / tsMsPerDay[precision] / days));
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue