You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@skywalking.apache.org by GitBox <gi...@apache.org> on 2020/10/01 03:50:45 UTC

[GitHub] [skywalking] dmsolr commented on a change in pull request #5585: fix timebucket converter issue

dmsolr commented on a change in pull request #5585:
URL: https://github.com/apache/skywalking/pull/5585#discussion_r497968636



##########
File path: oap-server/server-core/src/main/java/org/apache/skywalking/oap/server/core/analysis/TimeBucket.java
##########
@@ -104,6 +104,10 @@ public static boolean isDayBucket(long timeBucket) {
     public static long getTimestamp(long timeBucket, DownSampling downsampling) {
         Calendar calendar = Calendar.getInstance();
         calendar.setTimeInMillis(0);
+        calendar.set(Calendar.MILLISECOND, 0);
+        calendar.set(Calendar.SECOND, 0);
+        calendar.set(Calendar.MINUTE, 0);
+        calendar.set(Calendar.HOUR_OF_DAY, 0);

Review comment:
       Yes, they are required. The time equals zone offset  when `calendar.setTimeInMillis(0);` was presented. And then, I found some time zone is not a times as hour. But they all is a times as minute. (L107/L108 is optional.)




----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org