You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@superset.apache.org by "liangliangGit (via GitHub)" <gi...@apache.org> on 2024/02/01 11:23:36 UTC

[I] Timezone Misalignment in Apache Superset 3.0.1 Alert&Reports [superset]

liangliangGit opened a new issue, #26962:
URL: https://github.com/apache/superset/issues/26962

   ### Bug description
   
   Hello, I've encountered a timezone handling issue in Apache Superset version 3.0.1. The timezone setting for my report is configured to Australia/Perth, which aligns with the timezone of the server where Superset is installed.
   
   Despite being set to trigger at 10:00 AM daily, the actual triggering time for the report occurs at 7:00 PM, leading to a delay of 9 hours.
   
   Currently, we are using Apache Superset version 3.0.1 that internally uses Python version 3.9.8. Upon investigation, it appears that there might be an issue with timezone conversion in this specific code snippet from superset/tasks/cron_util.py in the 3.0.1 release:
   
   Python
   time_now = triggered_at.astimezone(tz)
   There seems to be a problem with the conversion specifically in Python 3.9.8, while it works as expected in Python 3.8.
   
   The issue can potentially be resolved by modifying the code in Python 3.9.8 as follows:
   
   Python
   tz_temp = ZoneInfo(tz.zone)
   time_now = triggered_at.astimezone(tz_temp)
   
   ### How to reproduce the bug
   
   1.Go to Alert&Report
   2.Configure a scheduled report, for example: Daily at 16:00 (based on your server's timezone). If you do not receive the report email at exactly 16:00, it is possible that the email may be delayed or arrive earlier, depending on your server's timezone.
   
   ### Screenshots/recordings
   
   _No response_
   
   ### Superset version
   
   3.0.3
   
   ### Python version
   
   3.9
   
   ### Node version
   
   16
   
   ### Browser
   
   Chrome
   
   ### Additional context
   
   _No response_
   
   ### Checklist
   
   - [X] I have searched Superset docs and Slack and didn't find a solution to my problem.
   - [X] I have searched the GitHub issue tracker and didn't find a similar bug report.
   - [X] I have checked Superset's logs for errors and if I found a relevant Python stacktrace, I included it here as text in the "additional context" section.


-- 
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: notifications-unsubscribe@superset.apache.org.apache.org

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


---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org


Re: [I] Timezone Misalignment in Apache Superset 3.0.1 Alert&Reports [superset]

Posted by "michael-s-molina (via GitHub)" <gi...@apache.org>.
michael-s-molina commented on issue #26962:
URL: https://github.com/apache/superset/issues/26962#issuecomment-1938708926

   Thanks @liangliangGit for checking. As soon as we have a fix for the issue, I'll cherry-pick it into supported versions.


-- 
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: notifications-unsubscribe@superset.apache.org

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


---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org


Re: [I] Timezone Misalignment in Apache Superset 3.0.1 Alert&Reports [superset]

Posted by "rusackas (via GitHub)" <gi...@apache.org>.
rusackas commented on issue #26962:
URL: https://github.com/apache/superset/issues/26962#issuecomment-2704687534

   This has been silent for upward of a year, but I'm worried about closing this particular one as stale. Can anyone give an update?


-- 
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: notifications-unsubscribe@superset.apache.org

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


---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org


Re: [I] Timezone Misalignment in Apache Superset 3.0.1 Alert&Reports [superset]

Posted by "rusackas (via GitHub)" <gi...@apache.org>.
rusackas closed issue #26962: Timezone Misalignment in Apache Superset 3.0.1 Alert&Reports
URL: https://github.com/apache/superset/issues/26962


-- 
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: notifications-unsubscribe@superset.apache.org

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


---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org


Re: [I] Timezone Misalignment in Apache Superset 3.0.1 Alert&Reports [superset]

Posted by "liangliangGit (via GitHub)" <gi...@apache.org>.
liangliangGit commented on issue #26962:
URL: https://github.com/apache/superset/issues/26962#issuecomment-1922599772

   > Hi @liangliangGit. Are you able to reproduce this issue using Superset 3.0.3?
   > 
   > From our issue instructions:
   > 
   > > If your environment does not match the alternatives, you need to upgrade your environment before submitting the issue as it may have already been fixed.
   
   Hi, michael-s-molina, I haven't had the chance to test this issue in a 3.0.3 environment due to internal company constraints on setting up such an environment. However, I have compared the code between versions 3.0.1 and 3.0.3, and found no differences in the relevant code sections. Also, after reviewing the CHANGELOG.md file, I did not find any related fixes documented for this issue. Here is the code for both versions 3.0.1 and 3.0.3:
   ![image](https://github.com/apache/superset/assets/35413857/b4183a77-0ff0-4fba-bd37-ffc820d4e392)
   ![image](https://github.com/apache/superset/assets/35413857/f58b86a1-c06a-4f70-95ae-c76f4f21ffe7)
   


-- 
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: notifications-unsubscribe@superset.apache.org

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


---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org


Re: [I] Timezone Misalignment in Apache Superset 3.0.1 Alert&Reports [superset]

Posted by "liangliangGit (via GitHub)" <gi...@apache.org>.
liangliangGit commented on issue #26962:
URL: https://github.com/apache/superset/issues/26962#issuecomment-1928902132

   In version 3.1.0, there is still an issue. 
   My docker-compose.yml file (
   [docker-compose.txt](https://github.com/apache/superset/files/14175849/docker-compose.txt)
   ) specifies the timezone within it. 
   On the report web page, the configured TIMEZONE is GMT +9:00 (Australia/Perth). 


-- 
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: notifications-unsubscribe@superset.apache.org

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


---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org


Re: [I] Timezone Misalignment in Apache Superset 3.0.1 Alert&Reports [superset]

Posted by "michael-s-molina (via GitHub)" <gi...@apache.org>.
michael-s-molina commented on issue #26962:
URL: https://github.com/apache/superset/issues/26962#issuecomment-1921589108

   Hi @liangliangGit. Are you able to reproduce this issue using Superset 3.0.3?
   
   From our issue instructions:
   > If your environment does not match the alternatives, you need to upgrade your environment before submitting the issue as it may have already been fixed.


-- 
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: notifications-unsubscribe@superset.apache.org

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


---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org


Re: [I] Timezone Misalignment in Apache Superset 3.0.1 Alert&Reports [superset]

Posted by "liangliangGit (via GitHub)" <gi...@apache.org>.
liangliangGit commented on issue #26962:
URL: https://github.com/apache/superset/issues/26962#issuecomment-1922787056

   datetime.utcnow() might need to be replaced with datetime.now(timezone.utc
   ![Capture](https://github.com/apache/superset/assets/35413857/3ed1eaeb-e744-49b9-91c8-f0b0662b44a5)
   


-- 
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: notifications-unsubscribe@superset.apache.org

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


---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org


Re: [I] Timezone Misalignment in Apache Superset 3.0.1 Alert&Reports [superset]

Posted by "rusackas (via GitHub)" <gi...@apache.org>.
rusackas commented on issue #26962:
URL: https://github.com/apache/superset/issues/26962#issuecomment-2949949963

   We haven't heard any updates, or whether this is an issue in 4.1.x, so I'll close this as "not planned" for now. Happy to reopen this if it's still relevant!


-- 
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: notifications-unsubscribe@superset.apache.org

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


---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org


Re: [I] Timezone Misalignment in Apache Superset 3.0.1 Alert&Reports [superset]

Posted by "nathan-gilbert (via GitHub)" <gi...@apache.org>.
nathan-gilbert commented on issue #26962:
URL: https://github.com/apache/superset/issues/26962#issuecomment-2045769044

   This seems similar to what I am experiencing as well: https://github.com/apache/superset/issues/27952


-- 
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: notifications-unsubscribe@superset.apache.org

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


---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org