Questions tagged [timezone]
The timezone tag has no usage guidance.
78
questions
0
votes
1
answer
329
views
timezone issue in magento 2.4.4p1
When I apply a purchased date filter to the customer order grid page continuously loads and in the log, I am getting the below error
After Upgrade php7.4 to php8 version issue is happening.
2023-01-...
0
votes
1
answer
74
views
How to get Current Store DateTime in Javascript magento2
How to get Current Store DateTime in Javascript magento2. Is any library function available?
1
vote
2
answers
398
views
how to convert current timezone date to gmtdate in magento 2?
In Magento store, it sets America/Toronto timezone
how to convert current date time to gmt date time,here is my current date time code
$currentTimeZoneTime = $this->timezone->date()->format('...
0
votes
1
answer
255
views
how to subtract 1 day from magneto 2 timezone function?
I have to use magento function for date and I wanna subtract 1 day from following code,how can I do it ? I do not want to use PHP function for date
how can I subtract 1 day from follwoing code ?
$...
0
votes
2
answers
203
views
Magento Admin After Login Redirect Back To Admin Login?
I'm using Magento 2.4.4, when I logged in to Magento admin it redirected me back to the login page without any errors. I checked logs but no errors in the log also, But I have 2 projects running on my ...
1
vote
3
answers
686
views
Get current Date and time on frontend
Problem:
After a long time of research, I have stuck to find it's the solution
I applied the following code but it didn't work.
$objectManager = \Magento\Framework\App\ObjectManager::getInstance();
$...
0
votes
1
answer
674
views
Date range issue in sales order grid in Magento2
In the sales order admin grid when we select a date range in Filter option Magento backend Sales -> Orders, it is not sticking to that date, and showing other dates too in the filter... For example,...
3
votes
0
answers
216
views
How to make Magento 2 log timestamp follows locale configuration?
How can i make exception.log, system.log, , debug.log or any other log inside var/log which is generated from magento 2 follows the configuration timestamp, right now it is showing the utc timezon in ...
0
votes
1
answer
307
views
How do I get a visitor time zone in magento 2 in contact us form
I have a contact us form, I want to set echo the time zone in my "abc.phtml" file on the basis of the visitor visits the page into the contact us form, it should display there and in my ...
0
votes
2
answers
732
views
Magento 2, Time is incorrect in Admin Grid
I use Magento 2.4.1. I have a problem with admin grid.
In my edit form, I set Booking From is: 18:30:00 and Booking To is: 19:30:00 at timezone GMT+7.
When I save, from, to are saved correctly to ...
1
vote
1
answer
180
views
Timezone and locale dropdown in custom form frontend
I need to add these 2 dropdown to the custom frontend form.
Any help would be appreciate. Thank you!
1
vote
0
answers
53
views
Different Time in Database and Collection
I am Facing a Strange issue.i have some data in report_viewed_product_index table
You can see this
I have created a Model for this table and Getting Data
But in Collection, I am getting a ...
1
vote
1
answer
258
views
Magento2 - unable to set CRON timezone
I am having timezone = 'Asia/Jakarta' everywhere in
Magento admin
Database
checked in phpinfo
Server
But still in the CRON logs I am getting UTC time only, I need this to be in 'Asia/Jakarta' only.
...
0
votes
1
answer
204
views
How to print timezone in order confirmation email template
I am trying to print the store timezone in order confirmation email. In my email template, I have added the order date as follows,
<div >{{trans ' Order Placed on <span >%created_at</...
1
vote
1
answer
509
views
Magento 2.3 get current local time in phtml
I want to load the current local time in a custom phtml file, that I want to load in my CMS Page.
I currently have the following code but that loads the GMC time, not my local time.
How can I change ...
1
vote
2
answers
771
views
Magento 2 Data Migration time difference?
We have migrated M1 customers and orders from M2.3.1 successfully with the datamigration tool but we are facing some discrepancy with the time differences.
The best example is customer create_at &...
2
votes
2
answers
1k
views
Magento 2 - Admin grid and export use different timezone
I'm using Magento 2. So, I created a Adminhtml data grid in a custom module. The problem is that the data grid doesn't match the exported data. I've set the timezone, but it seems data grid and ...
0
votes
1
answer
469
views
Magento 2 - Orders saving as local timzezone
I have an issue with how a Magento 2 store is saving orders.
My understanding was that orders are saved in UTC.
However, when new orders are placed, it is saving them as our local timezone in the ...
1
vote
2
answers
2k
views
M2 | How to configure store's timezone to set date as I am getting wrong date in magento?
I get different date from todays date. I tried below ways and all give difference in time:
1)
\Magento\Catalog\Block\Product\Context $contexts,
..........
..........
$this->...
1
vote
3
answers
3k
views
How to add/subtract month to/from date in Magento2?
I am getting date by injecting this class in constructor \Magento\Framework\Stdlib\DateTime\DateTime as:
protected $date;
public function __construct(
....
\Magento\Framework\Stdlib\DateTime\DateTime ...
4
votes
1
answer
273
views
order time difference from magento 1 to magento 2 after migration
I have migrated Magento 1.9.3.1 to Magento 2.3.0
I have setup timezone India Standard Time(Asia/Kolkata).
After migration created_time have differences of 5:30 hours. How can I fix the issue?
For ...
0
votes
1
answer
87
views
How to show current date and time list in dropdown in magento2.1.7?
How to show current date and time list in dropdown in magento2.1.7, As I have purchased an extension for store pickup in my magento2 site..
But the date , time functionality is not working properly, ...
0
votes
1
answer
847
views
Magento2 set timezone with mysql query
I am trying to get days difference between 2 dates with mysql query with DATEDIFF function for production_days column:
$collection->getSelect()->joinLeft(array('cvo' => 'cp_vendor_order'), "...
3
votes
1
answer
3k
views
Make magento 2 grid date column follow config timezone
I already set my timezone config to GMT+7 in backend , and i've created a custom module which will show grid in backend that has date column, the problem is the date is being save in utc format, and i ...
2
votes
1
answer
1k
views
Magento2: Order updated_at stored in DB in timezone CEST but delivered/transformed to UTC by $order->getUpdatedAt in Environment "crontab"
we are facing a strange behavior for value of updated_at saved in db table sales_order. Server timezone is CEST, updated_at date therefor is saved in CEST to database. This is validated. Default ...
1
vote
2
answers
4k
views
Magento2 convert UTC time to IST
Can anyone let me know how to change UTC time from table column to IST(Indian Standard time) programatically with Datetime format?
I have currently following date time value available in UTC format ...
1
vote
1
answer
2k
views
Order Confirmation email: How to get order date with correct store timezone?
If I include the order date in my order confirmation email template via ...
Order Date: {{var order.created_at}}
..., the resulting order confirmation emails contain the order date in UTC/GMT time. ...
0
votes
1
answer
245
views
Magento set Current Timezone
My store is from Chile
I'll set timezone America/Santiago from the backend.
When I place the order, it gets the wrong time.
I created one script and write below code.
<?php require 'app/Mage....
1
vote
0
answers
351
views
Custom Admin grid TimeZOne - Date issue in magento2
I have set default time zone pacific standard time(america/los_angeles)
In admin gridwhen i inline edit date
i take 31 aug 2018 but once it save it display 30 aug 2018.
see in images:
Have anyone ...
1
vote
0
answers
335
views
Building javascript "Order by for same day shipping" countdown timer
I've got an online store in Magento and I want to add a countdown timer so that if a customer orders by 5pm Eastern Standard time their product will ship the same day. I need it to be freely usable in ...
1
vote
0
answers
150
views
Wrong Moscow timezone in Magento 2
For Moscow, the time zone of GMT +3 should be set. But in fact, for Moscow is established GMT +4. As a result, in the whole system of Magento (in orders, email, etc.) I get time for +1 more than now.
...
0
votes
1
answer
1k
views
Fatal error: Call to a member function getConfigTimezone() on null Magento 2.2
I'm trying to create a helper class that will help me determine If I should present some labels like new/sale etc. I'd like to inject to it a TimezoneInterface via the constructor however $_localeDate ...
0
votes
1
answer
211
views
Is it OK to modify app/Mage.php to edit the date_default_timezone_set value in magento 1.9?
Is it OK to modify app/Mage.php to edit the date_default_timezone_set value?
I've modified my timezone in magento at System => General => Locale Options => Timezone, and set it to America/...
8
votes
2
answers
12k
views
magento 2 - getCreatedAt() returns UTC time and not local time
I am trying to get the order time, I fixed the problem with orders with wrong time stamp in admin panel. Now I am trying to get the order date in my module.
The problem is
$created = $order->...
1
vote
1
answer
561
views
How to get client(user) browser timezone in magento 2?
How to find client(user) browser timezone in magento 2?
1
vote
0
answers
149
views
Magento 2: Send email based on timezone selected by customer
I am developing extension in which I need to send email on base of selected Timezone by the customer.
I have set a cron which is working fine, however, I confused about to send email on the base of ...
5
votes
1
answer
1k
views
Magento 2 : Wrong order created and updated date in rest api response
I am fetching the orders using Magento 2 REST api services. I am using IST timezone the dates saved in the database are in correct timezone. I have set timezone to "Asia/Kolkata". On customer ...
0
votes
1
answer
116
views
getOptionTimezones with core php
In the magento when I print the getOptionTimezones I get the result as follows
$data['timezone_array'] = Mage::app()->getLocale()->getOptionTimezones();
[timezone_array] => Array
...
0
votes
1
answer
172
views
Magento 1.9 : How to create our own custom timezone?
I want to create my own custom timezome in magento at
System -> Configuration -> General -> Locale Options -> Timezone.
Can anyone help me in this ?
0
votes
4
answers
3k
views
Magento2 not getting current time
I have tried different options but i am not getting the current time, time shows the gmt time, but actual time setting is asia/kolkatta, any one done this, please update the answer.
protected $...
1
vote
1
answer
2k
views
Database dates get stored in local timezone
I'm having trouble with a timezone issue and I'm looking for confirmation.
Do dates get stored in the database in UTC. This seems to be th consensus I have found in other posts.
For example: If ...
0
votes
2
answers
2k
views
date displays wrong
I am trying to display a date in the frontend.
Currently the code calls the date like so
<?php echo $date->date('m-d-Y', $_item->getCreatedTime()); ?>
the date in the database is: 2017-...
7
votes
7
answers
48k
views
Convert datetime and timezone to datetime in Magento 2
How to convert datetime with timezone to datetime. I have tried multiple which are available on PHP blog. But nothing worked out. I am retrieving datetime from MySql query as 2017-01-20T13:59:19+03:00 ...
2
votes
0
answers
1k
views
Magento 2: Newsletter Queue Take Different Queue Start Time
I'm using Magento 2 CE Version 2.1.2
My locale is Asia/Singapore. When i queue my newsletter, it's taking different start time (or timezone).
If i put now, then also it's taking 8+ hours & in ...
0
votes
1
answer
255
views
Get Magento time via Javascript
I need to create a CMS page that will update information at specific times. E.g.: If now is 1pm, the page will display information X. If now is 2pm, the page will display information Y.
I created a ...
0
votes
1
answer
316
views
magento orders timezone issue
Magento is storing orders in UTC time, however I'd like it to be ETC. My server time is ETC already, however I believe I need to set it in magento as well. Where can I do it? Any help appreciated!
1
vote
0
answers
317
views
Magento Timezone Wrong
I can't seem to work out whats going on with my Magento timezones.
All my orders in the backend are processed correctly and have the correct times. The backend reports however are out by 13hrs. I've ...
21
votes
3
answers
12k
views
My magento 2 website is crashed: Unknown or bad timezone () error
When i am accessing my magento website i am getting errors
DateTimeZone::__construct(): Unknown or bad timezone ()
on Block and CMS pages and all my product list pages on frontend shows 404 page ...
0
votes
1
answer
464
views
What time zone should I set Magento for?
I live in KY US (Eastern Time UTC-05:00).
My customers are mostly from the US.
My server is in Phoenix AZ (Mountain Time UTC-07:00).
If I want to try to equal out the time as best as possible for ...
4
votes
0
answers
184
views
how to get visitor's UTC time not relying on store view time zone?
It is required to convert customer's (or guest visitor time zone) into UTC 0 to properly store in in database in timestamp column. In magento this often doing by relying on certain store view timezone....