-
Notifications
You must be signed in to change notification settings - Fork 19
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Tracking Email based on the user's timezone! #3
Comments
If this seems a valid issue, I would like to work on it! |
At the moment, user has to manually edit |
@Dilshan-H isntead of using can't we directly use Won't this give the current timezone of the user? Just a doubt |
If you are planning to host the application in a local environment, this works just fine. But when it comes to remote servers they are maybe located in different timezones. That's why we need to pass timezone parameter specifically. That way we can get the datetime according to our local time zone. |
Aah, didn't think of it that way, you're absolutely right. |
@saroshfarhan It's better to show that info as user can quickly refer their corresponding email at a later time. When there are lot of tracking links this might be useful in a way. |
Hey @Dilshan-H, We could import we would require tzlocal
from datetime import datetime as dt
import pytz
from tzlocal import get_localzone
generatedOn = str(dt.now().astimezone(pytz.timezone(str(get_localzone()))))
print(generatedOn) |
I think the better way would be to send the timezone from the browser using js! |
Actually that seems like a better way to achieve this.
It will produce the same issue as earlier isn't it? (When used in remote servers) |
So can you assign this to me |
It does only solve the backend time issue. Not when it runs on the server. |
Currently the emails are being tracked base on the timezone "Asia/Colombo" Instead we can track it using the timezone of the user!
The text was updated successfully, but these errors were encountered: