File tree Expand file tree Collapse file tree 1 file changed +4
-1
lines changed
packages/cubejs-schema-compiler/src/adapter Expand file tree Collapse file tree 1 file changed +4
-1
lines changed Original file line number Diff line number Diff line change @@ -13,6 +13,8 @@ export class Granularity {
1313
1414 public readonly granularityInterval : string ;
1515
16+ public readonly queryTimezone : string ;
17+
1618 public readonly granularityOffset : string | undefined ;
1719
1820 public readonly origin : moment . Moment ;
@@ -25,6 +27,7 @@ export class Granularity {
2527 ) {
2628 this . granularity = timeDimension . granularity ;
2729 this . predefinedGranularity = isPredefinedGranularity ( this . granularity ) ;
30+ this . queryTimezone = query . timezone ;
2831 this . origin = moment . tz ( query . timezone ) . startOf ( 'year' ) ; // Defaults to current year start
2932
3033 if ( this . predefinedGranularity ) {
@@ -59,7 +62,7 @@ export class Granularity {
5962 * @returns origin date string in Query timezone
6063 */
6164 public originLocalFormatted ( ) : string {
62- return this . origin . format ( 'YYYY-MM-DDTHH:mm:ss.SSS' ) ;
65+ return this . origin . tz ( this . queryTimezone ) . format ( 'YYYY-MM-DDTHH:mm:ss.SSS' ) ;
6366 }
6467
6568 /**
You can’t perform that action at this time.
0 commit comments