Skip to content

Commit 7085d2f

Browse files
committed
fix: Athena timezone conversion issue for non-UTC server
1 parent 69ef9ba commit 7085d2f

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

packages/cubejs-api-gateway/index.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,7 @@ const prepareAliasToMemberNameMap = (metaConfig, sqlQuery, query) => {
6363

6464
const transformValue = (value, type) => {
6565
if (value && type === 'time') {
66-
return moment(value).format(moment.HTML5_FMT.DATETIME_LOCAL_MS);
66+
return (value instanceof Date ? moment(value) : moment.utc(value)).format(moment.HTML5_FMT.DATETIME_LOCAL_MS);
6767
}
6868
return value && value.value ? value.value : value; // TODO move to sql adapter
6969
};

0 commit comments

Comments
 (0)