mirror of
https://gitcode.com/gh_mirrors/hy/Hydro.git
synced 2026-10-17 09:36:08 +08:00
ui: datetime: timezone support
This commit is contained in:
1 parent
17b6c2f6af
commit
79d5d09ad0
10 files changed
+16
-15
No files matched your search
@@ -124,7 +124,6 @@ env.addGlobal('Date', Date);
|
||||
env.addGlobal('process', process);
|
||||
env.addGlobal('global', global);
|
||||
env.addGlobal('typeof', (o) => typeof o);
|
||||
env.addGlobal('datetimeSpan', misc.datetimeSpan);
|
||||
env.addGlobal('paginate', misc.paginate);
|
||||
env.addGlobal('size', misc.size);
|
||||
env.addGlobal('utils', { status });
|
||||
@@ -159,6 +158,7 @@ async function render(name, state) {
|
||||
if (typeof text === 'string') return text;
|
||||
return state._(text.message).format(...text.params || []) + ((process.env.DEV && text.stack) ? `\n${text.stack}` : '');
|
||||
}).join('\n'),
|
||||
datetimeSpan: (arg0, arg1, arg2) => misc.datetimeSpan(arg0, arg1, arg2, state.handler.user?.timeZone),
|
||||
perm: global.Hydro.model.builtin.PERM,
|
||||
PRIV: global.Hydro.model.builtin.PRIV,
|
||||
STATUS: global.Hydro.model.builtin.STATUS,
|
||||
|
||||
Reference in new issue
Block a user