[ 
https://issues.apache.org/jira/browse/FLINK-4282?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15416572#comment-15416572
 ] 

Aditi Viswanathan commented on FLINK-4282:
------------------------------------------

Hi Renkai,

If you look at the PR you'll see that I've provided 2 ways to get offsets -
either java.util.TimeZone or long:

public static ProcessingTimeSessionWindows withGap(Time size, TimeZone
timezone) {
   return new ProcessingTimeSessionWindows(size.toMilliseconds(),
timezone.getRawOffset());
}


public static ProcessingTimeSessionWindows withGap(Time size, long
offsetMillis) {
   return new ProcessingTimeSessionWindows(size.toMilliseconds(), offsetMillis);
}


Is this what you were thinking of?



Aditi Viswanathan | +91-9632130809
Data Engineer,
[24]7 Customer Ltd.




> Add Offset Parameter to WindowAssigners
> ---------------------------------------
>
>                 Key: FLINK-4282
>                 URL: https://issues.apache.org/jira/browse/FLINK-4282
>             Project: Flink
>          Issue Type: Improvement
>          Components: Streaming
>            Reporter: Aljoscha Krettek
>
> Currently, windows are always aligned to EPOCH, which basically means days 
> are aligned with GMT. This is somewhat problematic for people living in 
> different timezones.
> And offset parameter would allow to adapt the window assigner to the timezone.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Reply via email to