You are viewing a plain text version of this content. The canonical link for it is here.
Posted to reviews@iotdb.apache.org by "bdemers (via GitHub)" <gi...@apache.org> on 2024/07/18 19:26:41 UTC

[I] [Bug] DateTimeUtilsTest.getConvertDurationIncludingMonthUnit() tests are timezone dependent [iotdb]

bdemers opened a new issue, #12970:
URL: https://github.com/apache/iotdb/issues/12970

   ### Search before asking
   
   - [X] I searched in the [issues](https://github.com/apache/iotdb/issues) and found nothing similar.
   
   
   ### Version
   
   1.3.3-SNAPSHOT
   
   ### Describe the bug and provide the minimal reproduce step
   
   Set your timezone to `UTC-4` (or anything `UTC-*` probably), and run the tests...
   
   ### What did you expect to see?
   
   Passing tests
   
   ### What did you see instead?
   
   failing tests
   
   ### Anything else?
   
   TL;DR: Adding a month to a date is problematic, depending on the TZ you are in.
   
   Copied from slack:
   
   I'm running the IoTDB UT's locally, (all the tests that are included in the default profiles, e.g. mvn clean install)
   All the tests pass except one in DateTimeUtilsTest
   [https://ge.apache.org/s/rd4tbdzopz2ju/tests/goal/org.apache.iotdb:iotdb-server:sure[…]IncludingMonthUnit?expanded-stacktrace=WyIwIl0&top-execution=1](https://ge.apache.org/s/rd4tbdzopz2ju/tests/goal/org.apache.iotdb:iotdb-server:surefire:test@default-test/details/org.apache.iotdb.db.utils.DateTimeUtilsTest/getConvertDurationIncludingMonthUnit?expanded-stacktrace=WyIwIl0&top-execution=1)
   
   Other than commented most of that test method, any ideas to work around/fix it?
   (i'm not ruling out user error either)
   
   Well... it's a TZ issue.  I'm currently UTC -4, if I set my timezone to UTC or something +, the test seem to pass.
   5097600000 in my TZ is Feb 28th, plus one month is March 28,
   Using UTC, it's March 1st, plus one month is April 1st
   
   ### Are you willing to submit a PR?
   
   - [X] I'm willing to submit a PR!


-- 
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.

To unsubscribe, e-mail: reviews-unsubscribe@iotdb.apache.org.apache.org

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


Re: [I] [Bug] DateTimeUtilsTest.getConvertDurationIncludingMonthUnit() tests are timezone dependent [iotdb]

Posted by "github-actions[bot] (via GitHub)" <gi...@apache.org>.
github-actions[bot] commented on issue #12970:
URL: https://github.com/apache/iotdb/issues/12970#issuecomment-2237372287

   Hi, this is your first issue in IoTDB project. Thanks for your report. Welcome to join the community!


-- 
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.

To unsubscribe, e-mail: reviews-unsubscribe@iotdb.apache.org

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


Re: [I] [Bug] DateTimeUtilsTest.getConvertDurationIncludingMonthUnit() tests are timezone dependent [iotdb]

Posted by "HTHou (via GitHub)" <gi...@apache.org>.
HTHou closed issue #12970: [Bug] DateTimeUtilsTest.getConvertDurationIncludingMonthUnit() tests are timezone dependent
URL: https://github.com/apache/iotdb/issues/12970


-- 
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.

To unsubscribe, e-mail: reviews-unsubscribe@iotdb.apache.org

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


Re: [I] [Bug] DateTimeUtilsTest.getConvertDurationIncludingMonthUnit() tests are timezone dependent [iotdb]

Posted by "HTHou (via GitHub)" <gi...@apache.org>.
HTHou closed issue #12970: [Bug] DateTimeUtilsTest.getConvertDurationIncludingMonthUnit() tests are timezone dependent
URL: https://github.com/apache/iotdb/issues/12970


-- 
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.

To unsubscribe, e-mail: reviews-unsubscribe@iotdb.apache.org

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