Class TestCurrentHourProvider

java.lang.Object
org.apache.hadoop.hbase.regionserver.compactions.TestCurrentHourProvider

public class TestCurrentHourProvider extends Object
  • Field Details

  • Constructor Details

  • Method Details

    • testWithEnvironmentEdge

      public void testWithEnvironmentEdge()
      In timezone GMT+08:00, the unix time of 2020-08-20 11:52:41 is 1597895561000 and the unix time of 2020-08-20 15:04:00 is 1597907081000, by calculating the delta time to get expected time in current timezone, then we can get special hour no matter which timezone it runs.

      In addition, we should consider the Daylight Saving Time. If in DaylightTime, we need reduce one hour.