[ 
https://issues.apache.org/jira/browse/RANGER-5754?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Chinmay N Hegde resolved RANGER-5754.
-------------------------------------
    Fix Version/s: 3.0.0
       Resolution: Fixed

> 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
>             Fix For: 3.0.0
>
>          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