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

Dhaval Shah commented on RANGER-5754:
-------------------------------------

Merged into apache master : 
[https://github.com/apache/ranger/commit/c227c010ed7334a431551580f18a4944e888cab1]
Thanks

> Fix timezone-sensitive test failures in MiscUtilTest
> ----------------------------------------------------
>
>                 Key: RANGER-5754
>                 URL: https://issues.apache.org/jira/browse/RANGER-5754
>             Project: Ranger
>          Issue Type: Bug
>          Components: Ranger
>    Affects Versions: 3.0.0
>            Reporter: Chinmay N Hegde
>            Assignee: Chinmay N Hegde
>            Priority: Major
>          Time Spent: 20m
>  Remaining Estimate: 0h
>
> Timezone-dependent unit test failures found in MiscUtilTest (failure outside 
> UTC)
> mainly in *testGetFormattedTime* and *testGetUTCDateForLocalDate.*
> For *testGetFormattedTime,* the test previously asserted a hardcoded UTC 
> date, while MiscUtil.getFormattedTime() uses SimpleDateFormat with the JVM 
> default timezone. 
> For {*}getUTCDateForLocalDate{*}, the method used timezone offset at the 
> current time (getOffset(local.getTimeInMillis())) instead of the input date 
> (getOffset(date.getTime())). In DST-observing zones, this can apply the wrong 
> seasonal offset.



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

Reply via email to