Questions tagged [timezone]

The tag has no usage guidance.

Filter by
Sorted by
Tagged with
16
votes
3answers
9k 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 ...
11
votes
5answers
8k views

What timezone are Magento cron jobs being run in?

My system's timezone is US/Eastern, my default store is US/Central and the database is UTC. At what time will the following doStuff method be called? <mymodule_do_stuff> <schedule><...
7
votes
7answers
33k 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 ...
7
votes
2answers
9k 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->...
6
votes
4answers
28k views

How to change Magento timezone?

I have used Magento 1.9 initially timezone was America/Los_Angeles in app/etc/config.xml file and set India/Calcutta timezone in System -> Configuration -> General -> Locale Options ->Timezone ...
6
votes
6answers
36k views

Get current date time used in magento for saving data

I want to get current date time which is magento used for save data into database. I searched and get this line of code, Mage::getModel('core/date')->date('Y-m-d H:i:s'); but this is not working ...
5
votes
1answer
2k views

Magento checking order updated_at using Magento date and time

we are trying to filter out orders that were created longer than 60 minutes ago with status pending. We are having some problems with the date/time functions We tried: - date('Y-m-d H:m:s') and ...
4
votes
1answer
174 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 ...
4
votes
1answer
925 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 ...
4
votes
0answers
174 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....
4
votes
2answers
3k views

Magento 1.9.0.1 Time Stamp Incorrect

I recently transferred servers and ever since my timestamps in Magento (both orders and help desk messages) are incorrect. I have checked all of my configuration settings, and they are correct. I have ...
3
votes
1answer
2k 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 ...
3
votes
1answer
2k views

Get Order datetime including timezone in email template

I try to modify default New Order email template. Currently, I get order datetime by {{var order.getCreatedAtFormated('short')}}. It results 6/18/2015 12:18 PM. I want to include timezone following ...
3
votes
1answer
608 views

Timezone issues when saving new model

There's a time issue I've noticed with saving new customers and the created_at attribute, where if you save the model twice, the time stored will be incorrect. To get around the issue you can call ...
2
votes
1answer
799 views

No time zone options in install wizard

The timezone dropdown is empty and I cannot get pass locale selection in magento 1.8 install wizard. I copied all the files to hosting ... so whats the idea? btw ... this solution http://www....
2
votes
1answer
575 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 ...
2
votes
1answer
2k views

New order with wrong time

When i created an order, the server will send out a new order email, but the order time was wrong. The time created in the email template {{var order.getCreatedAtFormated('long')}} is displayed at ...
2
votes
0answers
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 ...
2
votes
0answers
1k views

Catalog price rule doesn't apply overnight and possible incorrect time zone

Every time I update Magento I have got this probem: I have to manually applicate the catalog price rule, otherwise they don't work. I have done the following changes: File app/Mage.php: ...
2
votes
0answers
219 views

Customer created_at date is converted to UTC twice [closed]

I've found a problem with an extension we installed for registering new customers via social networks. Every customer that registers through the extension gets the wrong created_at date. We have our ...
2
votes
0answers
283 views

Cronjobs Reporting Negative Execution Times?

I'm getting a fairly weird result trying to check the status of my Magento store's cron jobs. I tried installing both AOE Scheduler and Noovias Cronjob Manager. Both of them give me something like ...
2
votes
1answer
590 views

Magento timestamp timezone problems

I have a client who recently implemented SAP using the "Insync" module. The Magento app is showing the timezone correctly but the db is showing the timestamps in UTC. The folks at Insync say we need ...
1
vote
2answers
2k 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
2answers
493 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 &...
1
vote
1answer
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 ...
1
vote
1answer
415 views

Pragmatically Convert a time to another times zone time

I am trying to do something like: My instance Locale default Timezone zone is Taipei Standard Time (Asia/Taipei) For a particular case,I want to get my current time in Tokyo Standard Time (Asia/...
1
vote
1answer
3k views

Time is not getting saved from magento admin form?

I have created a field in custom admin form with following code $fieldset->addField('post_date', 'date', array( 'label' => Mage::helper('sprung_blog')->__('Date'), 'name' =&...
1
vote
2answers
2k views

Magento reports and timezone issues

When viewing the Total Ordered Report I'm getting the following error message This report depends on timezone configuration. Once timezone is changed, the lifetime statistics need to be refreshed. ...
1
vote
1answer
43 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
2answers
497 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
1answer
290 views

Timezone (CST6CDT) is not a known timezone Magento cannot login to admin

timezone (CST6CDT) is not a known timezone";i:1;s:3233:"#0 \app\code\core\Mage\Core\Model\Locale.php(527): Zend_Date_DateObject->setTimezone('CST6CDT') Cannot login to admin panel i get this ...
1
vote
1answer
373 views

Timezone in email Invoice is different than than store

Timezone set in the backend - http://prntscr.com/44ti3x But timezone showing in email invoice - http://prntscr.com/44tin0 How can I change this to IST ??
1
vote
2answers
71 views

Is there any danger in resetting date_default_time_zone() mid-script?

I have a cms block in /app/design/frontend/default/{mytheme}/template/cms I was having trouble creating time-based control structures because PHP was using UTC instead of California Pacific time. So ...
1
vote
0answers
15 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 ...
1
vote
0answers
15 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
0answers
124 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. ...
1
vote
1answer
114 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
2answers
519 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 ...
1
vote
2answers
1k 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 ...
1
vote
1answer
1k 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. ...
1
vote
0answers
251 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
0answers
217 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
0answers
138 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. ...
1
vote
1answer
383 views

How to get client(user) browser timezone in magento 2?

How to find client(user) browser timezone in magento 2?
1
vote
0answers
108 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 ...
1
vote
0answers
264 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 ...
1
vote
1answer
482 views

Order time stamp off by 6 hours in the order Confirmation Email. It is CORRECT on the order itself in the Admin panel

The orders have correct date/time stamps in the Admin Panel (Sales - Orders - click an order open - under Order Date --) Apr 9, 2016 3:07:57 AM) but the time is off by exactly 6 hours in the Customer ...
1
vote
1answer
1k views

How to set Local Timezone when saving time into DB in Magento

I have applied following things to make Default time zone to my local timezone i.e. 'Asia/Calcutta' -- 1) changed in config.xml - <general> <locale> <code&...
1
vote
0answers
896 views

Where does Magento take the time from?

I upgraded my Cloud hosting account (doubled the processor and memory) but then was getting a problem with the Session Cookie Management (after customers would log in - it would take them to a page ...
0
votes
2answers
1k 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-...