So, I am trying to use pipeline to run my test codes, and I am encountering these weird problem that caused some tests failed.
I have a function that convert string into some 4 or 5 digits number that represent either he day or week. My tests are fine when running locally, however, it returns incorrect values when it is running in the pipeline:
See below example:
// output example from the pipeline:
res = DateHelper("2 weeks of daily data ending 2022-01-30")exp = {43053, 43054, 43055, 43056, 43057, 43058, 43059,43060, 43061, 43062, 43063, 43064, 43065, 43066}self.assertEqual(res.tm_dim_key_days, exp)res = DateHelper("2 months of weekly data ending 2023-11-10")exp = {2298, 2299, 2300, 2301, 2302, 2303, 2304, 2305, 2306}> self.assertEqual(res.tm_dim_key_weeks, exp)E AssertionError: Items in the first set but not the second:E 2296E 2297```
this is my first post, so please let me know if anything needed to be better clarify or more info is needed. Thanks.
ok, I found the solution. It is about the difference in timezone, and added the below line to my shell script resolved the issue.
export TZ=America/Chicago
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.