-
Notifications
You must be signed in to change notification settings - Fork 9.3k
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
Magento 2 Timezone Issue #7560
Comments
@shahankitb997 thank you for your report. |
Magento 2 CE Version 2.1.2 |
@veloraven This bug also affects newsletter queue. See issue #5943. |
@Ctucker9233 You are correct. I'm not able to send newsletter as per set on Admin Locale. Don't know why they have put Static code for setting TimeZone? It's pointless to provide Admin Settings for Locale Timezone. If you are going to override it. There should be only one way to set Timezone from Admin. No need the code of overriding it. |
@shahankitb997 @veloraven When I dug around in Magento\Framework\Stdlib\DateTime\DateTime, I noticed that there is supposed to be an offset created so that everything in the backend will display the proper local time. This offset seems to be broken or not used for some things. I believe it would fix the problem if that offset was also used in the newsletter queue. |
@Ctucker9233 So what will be the solution or quick fix for this one? |
@shahankitb997 I wish I had an answer for you. I haven't had time really to play with it. I have read in other issues of this type that changing the 'UTC' in date_default_timezone_set('UTC'); to your specific timezone code will temporarily fix the issue. But this modifies core code and would be overwritten in the case of an update or upgrade. @veloraven please give us some feedback and let us know that this issue is being taken seriously and what its priority level is. Ideally it's a one or two line fix so that the newsletter module inherits the correct timezone offset. Please advise. |
Hi @Ctucker9233 & @veloraven Any updates on this? |
@shahankitb997 I've got nothing. I'm actually not affiliated with Magento so I have no way of knowing. |
Thanks. @Ctucker9233 for reply. HI @veloraven any updates? |
Does anyone have update on this one? Thanks |
Any updates? |
@shahankitb997 I'm not sure that @veloraven is a real person. He/she never responds. |
Hi @Ctucker9233 so who is concern i need to report to? |
I've used @magento-admin and @magento-team with some success. In fact, if whoever is monitoring these tags reads this, we would appreciate a response. |
@magento-admin & @magento-team Any updates? |
Are more people having this issue? I have the exact same issue on Magento 2.1.3. The server, php and mysql time are set to Amsterdam. In the backend the locale is set to Amsterdam. However the time difference is 9 hours. |
@J96 Yes, still have this problem. I'm on version 2.1.4. I believe it is messing with my cron jobs as well. They "look" like they run ok, but I am unable to do basic things like send newsletters and automatic re-indexing. I have to run these jobs manually in CLI and only then does it actually work. |
@magento-team @magento-admin @magento-devops A little attention on this issue please! |
I am experiencing similar problem here, using locale timezone for Brazil. Running Magento CE ver. 2.1.6. For me the impact is when I want to know if the user has logged out. I am getting this output:Date time now: 24-04-2017 18:44:55
|
We already have internal ticket for this issue: MAGETWO-56349 |
@shahankitb997, thank you for your report. |
@magento-engcom-team Please backport to 2.1 or mark as up for grabs. |
I am not sure what you mean by back port to 2.1 or mark as up for grabs?
Can you provide documentation to do this.
thanks
Jason
On October 30, 2017 at 6:57:36 PM, Ctucker9233 (notifications@github.com) wrote:
@magento-engcom-team <https://github.com/magento-engcom-team> Please
backport to 2.1 or mark as up for grabs.
—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub
<#7560 (comment)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/AfpkLDbZOga5L8w2AH1R072SYnGKErIcks5sxlRfgaJpZM4K8C-v>
.
|
I have searched and I can not find how to do a backport or how to “Mark up
for grabs”.
I did find this ticket #8470
Which may be a similar issue. I see that it was updated with a fix. Will
that fix my issue?
Please provide some direction. We a couple days from launching the site
and this is a huge set back.
Thanks
Jason
Jason Smith
*CEO*
*Spot Marketing Group*
p: 519.303.1154 Ext. 110 m: 226.268.0064
f: 519.303.1153
a: 132 Thames St. N. Ingersoll, ON N5C 2T4
w: www.spotmarketing.ca e: jsmith@spotmarketing.ca
<https://www.facebook.com/SpotMarketingG/>
<https://twitter.com/spotmarketingg>
<https://ca.linkedin.com/in/jason-smith-99240a63>
[image: Inbound Certification] [image: HubSpot Certification] [image:
Inbound Sales Certification] [image: Partner Certification]
<http://hubs.ly/H035cNn0>
<http://offers.spotmarketing.ca/art-of-social-selling>
On October 30, 2017 at 6:58:48 PM, Jason Smith (jsmith@spotmarketing.ca)
wrote:
I am not sure what you mean by back port to 2.1 or mark as up for grabs?
Can you provide documentation to do this.
thanks
Jason
On October 30, 2017 at 6:57:36 PM, Ctucker9233 (notifications@github.com) wrote:
@magento-engcom-team <https://github.com/magento-engcom-team> Please
backport to 2.1 or mark as up for grabs.
—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub
<#7560 (comment)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/AfpkLDbZOga5L8w2AH1R072SYnGKErIcks5sxlRfgaJpZM4K8C-v>
.
|
@spotmarketing I was asking the Magento team to backport it or mark it up for grabs. Since the original issue was reported against 2.1 it should be fixed in 2.1 in my opinion. Unless you are part of the Magento team, this isn't likely something you can do. |
Thanks but I am looking for an answer on this. It is not fixed in 2.1 and
we are unable to launch the site because of this issue.
How to I go about getting a resolution on this?
Thanks
Jason
Jason Smith
*CEO*
*Spot Marketing Group*
p: 519.303.1154 Ext. 110 m: 226.268.0064
f: 519.303.1153
a: 132 Thames St. N. Ingersoll, ON N5C 2T4
w: www.spotmarketing.ca e: jsmith@spotmarketing.ca
<https://www.facebook.com/SpotMarketingG/>
<https://twitter.com/spotmarketingg>
<https://ca.linkedin.com/in/jason-smith-99240a63>
[image: Inbound Certification] [image: HubSpot Certification] [image:
Inbound Sales Certification] [image: Partner Certification]
<http://hubs.ly/H035cNn0>
<http://offers.spotmarketing.ca/art-of-social-selling>
On December 14, 2017 at 4:58:38 PM, Ctucker9233 (notifications@github.com) wrote:
@spotmarketing <https://github.com/spotmarketing> I was asking the Magento
team to backport it or mark it up for grabs. Since the original issue was
reported against 2.1 it should be fixed in 2.1 in my opinion. Unless you
are part of the Magento team, this isn't likely something you can do.
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#7560 (comment)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/AfpkLItR0zbcyWy8Qjwkn9pnNKtVXuG5ks5tAZoNgaJpZM4K8C-v>
.
|
@spotmarketing You would have to look at the commits listed in this issue thread and cherry pick it into your magento version. That's the only way I would know how to resolve it right now. I just hope @magento-engcom-team is listening and will backport this to a 2.1 version sometime soon. |
Hi Guys! Basically, Magento 2 uses CURRENT_TIMESTAMP as the default value for most of data fields (like created_at/updated_at). To check what is your current timestamp, you can execute the following SQL query:
As a result, we would see date in the default server timezone. However, Magento 2 expects to see it in UTC and that's good if your server/database timezone in UTC, but if it's not, you would get this issue. So please make sure that system stores data in UTC in your database. If not, please make it so, and then Magento 2 would work with dates as expected. The downside is 3rd-party that are not locale into account, but this is kind of different story. Hopefully you find this experience helpful :) |
For anybody who is having a timezone construct admin error on their magento 2.3.0 admin once logging in post upgrade from Magento 2.2.6 (similar to this) Http error Magento_log The easiest workaround is to check that your admin_users table are all using the interface local of your default store. My users where set to use en_US when actually my stores timezone and language where all set to en_GB Once manually updating the database records for each user re-run bin/magento setup:upgrade |
Hi All, I am using Magento 2.3.0 and still facing issue regarding Order Date after migration from Magento 1. Can any body suggest me a working solution for this issue. |
+1 on having this issue still on Order Date from Mage 1 to Mage 2 (2.2.6) bootstrap.php shows UTC config > locale options set to "America/Chicago" and last order should be 3pm and it's showing 1am. |
Server Time is correct (Europe/Amsterdam), PHP is correct (Europe/Amsterdam). |
Why is this issue closed, yet people are still experiencing the issue?? |
Hi, Do anyone have any solution for the issue so far...? i upgraded to Magento 2.3.1 but issue is still there. |
@netzwelt-nishu - are you using different timezones for admin users i.e en_US en_GB? - If so as a work-around try and set all your admin users to use the same timezone as your default store |
Someone found a solution? |
Problem still exists in 2.4. Even the logs have the wrong timezone...but someone thinks it's ok to close this and hide it under the carpet. |
The error persists in Magento 2.3.5, Timezone Europe/Madrid in php.ini and Magento configuration and the confirmation request emails are seen with a 2h delay EDIT: I have solved it by saving a custom configuration for each Website and not using the global value. |
Random Fix that worked for our instance. Make sure the app/bootstrap.php is UTC -> date_default_timezone_set('UTC'); Not really sure what went down, but that actually fixed it. |
Any news about this? Why is such an important issue closed??? @neddy236 I tried to change the timezone to another > save and then set it to my timezone but nothing changed! |
Hello @cptX @chdzma @neddy236 @onepack @zonaidev @roma-glushko @shahankitb997 We are experiencing strange issue on Production LIVE environment with Adobe Commerce ver. 2.4.5-p2 This is how the Homepage scheduling was set up, this is how all homepages have been set up - I think that there could possibly be an issue regarding the timing of Magento in the back end. This is the only thing that i could possibly think could have caused this issue. Regards, |
Preconditions
Admin -> Stores -> Configuration -> General -> Locale Options
.Timezone set to "Singapore Standard Time (Asia/Singapore)"
On
magento2\app\bootstrap.php
at end of file there is static line writtendate_default_timezone_set('UTC');
If i need Magento Date
I have to go to the file & change
Steps to reproduce
magento2\app\bootstrap.php
date_default_timezone_set('UTC');
Expected result
Actual result
The text was updated successfully, but these errors were encountered: