Skip to content

Commit e704867

Browse files
committed
fix: Max date measures incorrectly converted for MySQL
1 parent d2f1732 commit e704867

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
@@ -58,7 +58,7 @@ const prepareAnnotation = (metaConfig, query) => {
5858
};
5959

6060
const transformValue = (value, type) => {
61-
if (value && type === 'time') {
61+
if (value && (type === 'time' || value instanceof Date)) { // TODO support for max time
6262
return (value instanceof Date ? moment(value) : moment.utc(value)).format(moment.HTML5_FMT.DATETIME_LOCAL_MS);
6363
}
6464
return value && value.value ? value.value : value; // TODO move to sql adapter

0 commit comments

Comments
 (0)