Skip to content

Commit e1c4fa8

Browse files
committed
DST adjust
1 parent 29753e5 commit e1c4fa8

File tree

2 files changed

+14
-2
lines changed

2 files changed

+14
-2
lines changed

dist/easycoder.js

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2476,7 +2476,7 @@ const EasyCoder_Core = {
24762476
radius_t
24772477
};
24782478
}
2479-
if ([`now`, `today`, `newline`, `backtick`, `break`, `empty`, `uuid`].includes(token)) {
2479+
if ([`now`, `timestamp`, `today`, `newline`, `backtick`, `break`, `empty`, `uuid`].includes(token)) {
24802480
compiler.next();
24812481
return {
24822482
domain: `core`,
@@ -2918,6 +2918,12 @@ const EasyCoder_Core = {
29182918
numeric: true,
29192919
content: now
29202920
};
2921+
case `timestamp`:
2922+
return {
2923+
type: `constant`,
2924+
numeric: true,
2925+
content: Math.floor(Date.now() / 1000)
2926+
};
29212927
case `millisecond`:
29222928
return {
29232929
type: `constant`,

js/easycoder/Core.js

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2476,7 +2476,7 @@ const EasyCoder_Core = {
24762476
radius_t
24772477
};
24782478
}
2479-
if ([`now`, `today`, `newline`, `backtick`, `break`, `empty`, `uuid`].includes(token)) {
2479+
if ([`now`, `timestamp`, `today`, `newline`, `backtick`, `break`, `empty`, `uuid`].includes(token)) {
24802480
compiler.next();
24812481
return {
24822482
domain: `core`,
@@ -2918,6 +2918,12 @@ const EasyCoder_Core = {
29182918
numeric: true,
29192919
content: now
29202920
};
2921+
case `timestamp`:
2922+
return {
2923+
type: `constant`,
2924+
numeric: true,
2925+
content: Math.floor(Date.now() / 1000)
2926+
};
29212927
case `millisecond`:
29222928
return {
29232929
type: `constant`,

0 commit comments

Comments
 (0)