fix: dont pad numbers in redis key dates
This commit is contained in:
@@ -116,11 +116,11 @@ function componentToHex(c: number) {
|
||||
export function getTimeCacheKey() {
|
||||
const d = new Date();
|
||||
const year = d.getFullYear();
|
||||
const month = d.getMonth().toString().padStart(2, "0");
|
||||
const day = d.getDate().toString().padStart(2, "0");
|
||||
const hour = d.getHours().toString().padStart(2, "0");
|
||||
const minute = d.getMinutes().toString().padStart(2, "0");
|
||||
const seconds = d.getSeconds().toString().padStart(2, "0");
|
||||
const month = d.getMonth().toString();
|
||||
const day = d.getDate().toString();
|
||||
const hour = d.getHours().toString();
|
||||
const minute = d.getMinutes().toString();
|
||||
const seconds = d.getSeconds().toString();
|
||||
return `${year}:${month}:${day}:${hour}:${minute}:${seconds}`;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user