How to change Magento timezone?Order time stamp off by 6 hours in the order Confirmation Email. It is CORRECT on the order itself in the Admin panelCronjob trouble after changing timezoneIs it OK to modify app/Mage.php to edit the date_default_timezone_set value in magento 1.9?Magento 1.9.2 not sending new order confirmation emailsMagento checking order updated_at using Magento date and timeFresh install, no plug ins, fatal error on category management pageHow to set Local Timezone when saving time into DB in MagentoOrder time stamp off by 6 hours in the order Confirmation Email. It is CORRECT on the order itself in the Admin panelMagento Timezone Wrongmagento orders timezone issueHow to edit “This Shipping method is currently unavailable” messageMagento 1.9.3.8 Saving Newsletter subscriptions and unsubscriptions timestampGetting error after adding config in Magento 1.9.3.6

CREATE opcode: what does it really do?

Italian words for tools

How does Loki do this?

Personal Teleportation as a Weapon

Is there a problem with hiding "forgot password" until it's needed?

Applicability of Single Responsibility Principle

How does it work when somebody invests in my business?

Why didn't Theresa May consult with Parliament before negotiating a deal with the EU?

Balance Issues for a Custom Sorcerer Variant

How to check is there any negative term in a large list?

How to escape string to filename? It is in backup a file append date

What is paid subscription needed for in Mortal Kombat 11?

Tiptoe or tiphoof? Adjusting words to better fit fantasy races

What is the best translation for "slot" in the context of multiplayer video games?

Two monoidal structures and copowering

Why, precisely, is argon used in neutrino experiments?

How do I go from 300 unfinished/half written blog posts, to published posts?

I'm in charge of equipment buying but no one's ever happy with what I choose. How to fix this?

Overloading istream>> to read comma-separated input

What is the intuitive meaning of having a linear relationship between the logs of two variables?

Closest Prime Number

Class Action - which options I have?

How to write papers efficiently when English isn't my first language?

How did Arya survive the stabbing?



How to change Magento timezone?


Order time stamp off by 6 hours in the order Confirmation Email. It is CORRECT on the order itself in the Admin panelCronjob trouble after changing timezoneIs it OK to modify app/Mage.php to edit the date_default_timezone_set value in magento 1.9?Magento 1.9.2 not sending new order confirmation emailsMagento checking order updated_at using Magento date and timeFresh install, no plug ins, fatal error on category management pageHow to set Local Timezone when saving time into DB in MagentoOrder time stamp off by 6 hours in the order Confirmation Email. It is CORRECT on the order itself in the Admin panelMagento Timezone Wrongmagento orders timezone issueHow to edit “This Shipping method is currently unavailable” messageMagento 1.9.3.8 Saving Newsletter subscriptions and unsubscriptions timestampGetting error after adding config in Magento 1.9.3.6













5















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




at that time Magento function Mage::getModel('core/date')->date('Y-m-d H:i:s') return correct date.

But order placed time was -5:30 to real time.



For set Asia/Calcutta timezone, I have changed app/etc/config.xml general->locale->timezone to Asia/Calcutta and in app/Mage.php I have changed UTC to Asia/Calcutta,



And it has changed the timezone in the backend, it means order placed time is correct as real-time but the function Mage::getModel('core/date')->date('Y-m-d H:i:s') return me +5:30 time to real time.



Is there any place where I missed to change?



Or Is there another method to change the timezone of the Magento store?










share|improve this question




























    5















    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




    at that time Magento function Mage::getModel('core/date')->date('Y-m-d H:i:s') return correct date.

    But order placed time was -5:30 to real time.



    For set Asia/Calcutta timezone, I have changed app/etc/config.xml general->locale->timezone to Asia/Calcutta and in app/Mage.php I have changed UTC to Asia/Calcutta,



    And it has changed the timezone in the backend, it means order placed time is correct as real-time but the function Mage::getModel('core/date')->date('Y-m-d H:i:s') return me +5:30 time to real time.



    Is there any place where I missed to change?



    Or Is there another method to change the timezone of the Magento store?










    share|improve this question


























      5












      5








      5


      4






      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




      at that time Magento function Mage::getModel('core/date')->date('Y-m-d H:i:s') return correct date.

      But order placed time was -5:30 to real time.



      For set Asia/Calcutta timezone, I have changed app/etc/config.xml general->locale->timezone to Asia/Calcutta and in app/Mage.php I have changed UTC to Asia/Calcutta,



      And it has changed the timezone in the backend, it means order placed time is correct as real-time but the function Mage::getModel('core/date')->date('Y-m-d H:i:s') return me +5:30 time to real time.



      Is there any place where I missed to change?



      Or Is there another method to change the timezone of the Magento store?










      share|improve this question
















      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




      at that time Magento function Mage::getModel('core/date')->date('Y-m-d H:i:s') return correct date.

      But order placed time was -5:30 to real time.



      For set Asia/Calcutta timezone, I have changed app/etc/config.xml general->locale->timezone to Asia/Calcutta and in app/Mage.php I have changed UTC to Asia/Calcutta,



      And it has changed the timezone in the backend, it means order placed time is correct as real-time but the function Mage::getModel('core/date')->date('Y-m-d H:i:s') return me +5:30 time to real time.



      Is there any place where I missed to change?



      Or Is there another method to change the timezone of the Magento store?







      magento-1.9 timezone






      share|improve this question















      share|improve this question













      share|improve this question




      share|improve this question








      edited yesterday









      magefms

      2,0722426




      2,0722426










      asked Mar 10 '16 at 6:20









      Vinaya MaheshwariVinaya Maheshwari

      1,18711847




      1,18711847




















          3 Answers
          3






          active

          oldest

          votes


















          8














          You can set timezone from Admin panel ,



          Go to :




          System => Configuration => General => Locale Options =>Timezone




          enter image description here



          AND



          Change the default timezon in file app/Mage.php



          date_default_timezone_set('UTC');


          Replace above line with following



          date_default_timezone_set('Asia/Calcutta');


          AND



          Copy file app/code/core/Mage/Core/Model/Locale.php to app/code/local/Mage/Core/Model/Locale.php then find line 38



          const DEFAULT_TIMEZONE = 'UTC';


          Replace above line with following



          const DEFAULT_TIMEZONE = 'Asia/Calcutta';


          Note: If still it will not work. Dig in to following function in app/code/local/Mage/Core/Model/Locale.php.



          public function storeDate($store=null, $date=null, $includeTime=false, $format = null)

          $timezone = Mage::app()->getStore($store)->getConfig(self::XML_PATH_DEFAULT_TIMEZONE);
          $date = new Zend_Date($date, $format, $this->getLocale());
          $date->setTimezone($timezone);
          if (!$includeTime)
          $date->setHour(0)
          ->setMinute(0)
          ->setSecond(0);

          return $date;



          Hope this helps






          share|improve this answer

























          • I have already set India Standard time (Asia/Calcutta) in Timezone.

            – Vinaya Maheshwari
            Mar 10 '16 at 6:31











          • @VinayaMaheshwari Check updated answer

            – Rohit Kundale
            Mar 10 '16 at 6:38











          • Hello @Rohit, this is not working for me.

            – Vinaya Maheshwari
            Mar 10 '16 at 6:44


















          7














          you have to set your timezone manually



          first go to



          app/etc/config.xml add your time zone here



          <general>
          <locale>
          <code>en_US</code>
          <timezone>Asia/Calcutta</timezone>
          </locale>
          </general>


          second go to app/Mage.php



          on line 768



          change this line too



          date_default_timezone_set('UTC');



          to your timezone



          date_default_timezone_set('Asia/Calcutta');






          share|improve this answer























          • Hello @Qaisar Satti, please read my question, both changes I have already made but the problem is Mage::getModel('core/date')->date('Y-m-d H:i:s') function return me incorrect time +5:30 to real time. Is there any place where I missed to change?

            – Vinaya Maheshwari
            Mar 10 '16 at 6:34











          • did you check with new order time is correct?

            – Qaisar Satti
            Mar 10 '16 at 6:35











          • Yes I have said in my question that order place time is correct.

            – Vinaya Maheshwari
            Mar 10 '16 at 6:37











          • did you refresh the cache? delete var/cache folder because for after these it good to go

            – Qaisar Satti
            Mar 10 '16 at 6:39











          • Yes I refresh cache from backend and also remove from var/cache folder.

            – Vinaya Maheshwari
            Mar 10 '16 at 6:46


















          0














          Your locale settings are defined in the configuration under System => Configuration => General => Locale Options =>Timezone, and can be set per website scope.



          You can quickly get/change in your core_config_data table (SELECT * FROM core_config_data WHERE path = 'general/locale/timezone';).



          You might use Mage::getModel('core/date') for getting current time and date.




          Getting formatted date based on locale settings:



          echo Mage::getModel('core/date')->date('d/m/Y H:i:s');
          # return 22/10/2017 23:30:21

          echo Mage::getModel('core/date')->timestamp();
          # return current timestamp

          echo date('d/m/Y H:i:s', Mage::getSingleton('core/date')->gmtTimestamp());
          # returo current date in GMT timezone, doesn't matter your locale settings


          enter image description here
          See app/code/core/Mage/Core/Model/Date.php for a complete list of methods available.



          My suggestion is: try to convert everything to GMT using this model's GMT methods, and stop worrying about php.ini, magento XML, and so on.






          share|improve this answer
























            Your Answer








            StackExchange.ready(function()
            var channelOptions =
            tags: "".split(" "),
            id: "479"
            ;
            initTagRenderer("".split(" "), "".split(" "), channelOptions);

            StackExchange.using("externalEditor", function()
            // Have to fire editor after snippets, if snippets enabled
            if (StackExchange.settings.snippets.snippetsEnabled)
            StackExchange.using("snippets", function()
            createEditor();
            );

            else
            createEditor();

            );

            function createEditor()
            StackExchange.prepareEditor(
            heartbeatType: 'answer',
            autoActivateHeartbeat: false,
            convertImagesToLinks: false,
            noModals: true,
            showLowRepImageUploadWarning: true,
            reputationToPostImages: null,
            bindNavPrevention: true,
            postfix: "",
            imageUploader:
            brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
            contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
            allowUrls: true
            ,
            onDemand: true,
            discardSelector: ".discard-answer"
            ,immediatelyShowMarkdownHelp:true
            );



            );













            draft saved

            draft discarded


















            StackExchange.ready(
            function ()
            StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fmagento.stackexchange.com%2fquestions%2f105546%2fhow-to-change-magento-timezone%23new-answer', 'question_page');

            );

            Post as a guest















            Required, but never shown

























            3 Answers
            3






            active

            oldest

            votes








            3 Answers
            3






            active

            oldest

            votes









            active

            oldest

            votes






            active

            oldest

            votes









            8














            You can set timezone from Admin panel ,



            Go to :




            System => Configuration => General => Locale Options =>Timezone




            enter image description here



            AND



            Change the default timezon in file app/Mage.php



            date_default_timezone_set('UTC');


            Replace above line with following



            date_default_timezone_set('Asia/Calcutta');


            AND



            Copy file app/code/core/Mage/Core/Model/Locale.php to app/code/local/Mage/Core/Model/Locale.php then find line 38



            const DEFAULT_TIMEZONE = 'UTC';


            Replace above line with following



            const DEFAULT_TIMEZONE = 'Asia/Calcutta';


            Note: If still it will not work. Dig in to following function in app/code/local/Mage/Core/Model/Locale.php.



            public function storeDate($store=null, $date=null, $includeTime=false, $format = null)

            $timezone = Mage::app()->getStore($store)->getConfig(self::XML_PATH_DEFAULT_TIMEZONE);
            $date = new Zend_Date($date, $format, $this->getLocale());
            $date->setTimezone($timezone);
            if (!$includeTime)
            $date->setHour(0)
            ->setMinute(0)
            ->setSecond(0);

            return $date;



            Hope this helps






            share|improve this answer

























            • I have already set India Standard time (Asia/Calcutta) in Timezone.

              – Vinaya Maheshwari
              Mar 10 '16 at 6:31











            • @VinayaMaheshwari Check updated answer

              – Rohit Kundale
              Mar 10 '16 at 6:38











            • Hello @Rohit, this is not working for me.

              – Vinaya Maheshwari
              Mar 10 '16 at 6:44















            8














            You can set timezone from Admin panel ,



            Go to :




            System => Configuration => General => Locale Options =>Timezone




            enter image description here



            AND



            Change the default timezon in file app/Mage.php



            date_default_timezone_set('UTC');


            Replace above line with following



            date_default_timezone_set('Asia/Calcutta');


            AND



            Copy file app/code/core/Mage/Core/Model/Locale.php to app/code/local/Mage/Core/Model/Locale.php then find line 38



            const DEFAULT_TIMEZONE = 'UTC';


            Replace above line with following



            const DEFAULT_TIMEZONE = 'Asia/Calcutta';


            Note: If still it will not work. Dig in to following function in app/code/local/Mage/Core/Model/Locale.php.



            public function storeDate($store=null, $date=null, $includeTime=false, $format = null)

            $timezone = Mage::app()->getStore($store)->getConfig(self::XML_PATH_DEFAULT_TIMEZONE);
            $date = new Zend_Date($date, $format, $this->getLocale());
            $date->setTimezone($timezone);
            if (!$includeTime)
            $date->setHour(0)
            ->setMinute(0)
            ->setSecond(0);

            return $date;



            Hope this helps






            share|improve this answer

























            • I have already set India Standard time (Asia/Calcutta) in Timezone.

              – Vinaya Maheshwari
              Mar 10 '16 at 6:31











            • @VinayaMaheshwari Check updated answer

              – Rohit Kundale
              Mar 10 '16 at 6:38











            • Hello @Rohit, this is not working for me.

              – Vinaya Maheshwari
              Mar 10 '16 at 6:44













            8












            8








            8







            You can set timezone from Admin panel ,



            Go to :




            System => Configuration => General => Locale Options =>Timezone




            enter image description here



            AND



            Change the default timezon in file app/Mage.php



            date_default_timezone_set('UTC');


            Replace above line with following



            date_default_timezone_set('Asia/Calcutta');


            AND



            Copy file app/code/core/Mage/Core/Model/Locale.php to app/code/local/Mage/Core/Model/Locale.php then find line 38



            const DEFAULT_TIMEZONE = 'UTC';


            Replace above line with following



            const DEFAULT_TIMEZONE = 'Asia/Calcutta';


            Note: If still it will not work. Dig in to following function in app/code/local/Mage/Core/Model/Locale.php.



            public function storeDate($store=null, $date=null, $includeTime=false, $format = null)

            $timezone = Mage::app()->getStore($store)->getConfig(self::XML_PATH_DEFAULT_TIMEZONE);
            $date = new Zend_Date($date, $format, $this->getLocale());
            $date->setTimezone($timezone);
            if (!$includeTime)
            $date->setHour(0)
            ->setMinute(0)
            ->setSecond(0);

            return $date;



            Hope this helps






            share|improve this answer















            You can set timezone from Admin panel ,



            Go to :




            System => Configuration => General => Locale Options =>Timezone




            enter image description here



            AND



            Change the default timezon in file app/Mage.php



            date_default_timezone_set('UTC');


            Replace above line with following



            date_default_timezone_set('Asia/Calcutta');


            AND



            Copy file app/code/core/Mage/Core/Model/Locale.php to app/code/local/Mage/Core/Model/Locale.php then find line 38



            const DEFAULT_TIMEZONE = 'UTC';


            Replace above line with following



            const DEFAULT_TIMEZONE = 'Asia/Calcutta';


            Note: If still it will not work. Dig in to following function in app/code/local/Mage/Core/Model/Locale.php.



            public function storeDate($store=null, $date=null, $includeTime=false, $format = null)

            $timezone = Mage::app()->getStore($store)->getConfig(self::XML_PATH_DEFAULT_TIMEZONE);
            $date = new Zend_Date($date, $format, $this->getLocale());
            $date->setTimezone($timezone);
            if (!$includeTime)
            $date->setHour(0)
            ->setMinute(0)
            ->setSecond(0);

            return $date;



            Hope this helps







            share|improve this answer














            share|improve this answer



            share|improve this answer








            edited Mar 10 '16 at 7:46

























            answered Mar 10 '16 at 6:24









            Rohit KundaleRohit Kundale

            2,89911327




            2,89911327












            • I have already set India Standard time (Asia/Calcutta) in Timezone.

              – Vinaya Maheshwari
              Mar 10 '16 at 6:31











            • @VinayaMaheshwari Check updated answer

              – Rohit Kundale
              Mar 10 '16 at 6:38











            • Hello @Rohit, this is not working for me.

              – Vinaya Maheshwari
              Mar 10 '16 at 6:44

















            • I have already set India Standard time (Asia/Calcutta) in Timezone.

              – Vinaya Maheshwari
              Mar 10 '16 at 6:31











            • @VinayaMaheshwari Check updated answer

              – Rohit Kundale
              Mar 10 '16 at 6:38











            • Hello @Rohit, this is not working for me.

              – Vinaya Maheshwari
              Mar 10 '16 at 6:44
















            I have already set India Standard time (Asia/Calcutta) in Timezone.

            – Vinaya Maheshwari
            Mar 10 '16 at 6:31





            I have already set India Standard time (Asia/Calcutta) in Timezone.

            – Vinaya Maheshwari
            Mar 10 '16 at 6:31













            @VinayaMaheshwari Check updated answer

            – Rohit Kundale
            Mar 10 '16 at 6:38





            @VinayaMaheshwari Check updated answer

            – Rohit Kundale
            Mar 10 '16 at 6:38













            Hello @Rohit, this is not working for me.

            – Vinaya Maheshwari
            Mar 10 '16 at 6:44





            Hello @Rohit, this is not working for me.

            – Vinaya Maheshwari
            Mar 10 '16 at 6:44













            7














            you have to set your timezone manually



            first go to



            app/etc/config.xml add your time zone here



            <general>
            <locale>
            <code>en_US</code>
            <timezone>Asia/Calcutta</timezone>
            </locale>
            </general>


            second go to app/Mage.php



            on line 768



            change this line too



            date_default_timezone_set('UTC');



            to your timezone



            date_default_timezone_set('Asia/Calcutta');






            share|improve this answer























            • Hello @Qaisar Satti, please read my question, both changes I have already made but the problem is Mage::getModel('core/date')->date('Y-m-d H:i:s') function return me incorrect time +5:30 to real time. Is there any place where I missed to change?

              – Vinaya Maheshwari
              Mar 10 '16 at 6:34











            • did you check with new order time is correct?

              – Qaisar Satti
              Mar 10 '16 at 6:35











            • Yes I have said in my question that order place time is correct.

              – Vinaya Maheshwari
              Mar 10 '16 at 6:37











            • did you refresh the cache? delete var/cache folder because for after these it good to go

              – Qaisar Satti
              Mar 10 '16 at 6:39











            • Yes I refresh cache from backend and also remove from var/cache folder.

              – Vinaya Maheshwari
              Mar 10 '16 at 6:46















            7














            you have to set your timezone manually



            first go to



            app/etc/config.xml add your time zone here



            <general>
            <locale>
            <code>en_US</code>
            <timezone>Asia/Calcutta</timezone>
            </locale>
            </general>


            second go to app/Mage.php



            on line 768



            change this line too



            date_default_timezone_set('UTC');



            to your timezone



            date_default_timezone_set('Asia/Calcutta');






            share|improve this answer























            • Hello @Qaisar Satti, please read my question, both changes I have already made but the problem is Mage::getModel('core/date')->date('Y-m-d H:i:s') function return me incorrect time +5:30 to real time. Is there any place where I missed to change?

              – Vinaya Maheshwari
              Mar 10 '16 at 6:34











            • did you check with new order time is correct?

              – Qaisar Satti
              Mar 10 '16 at 6:35











            • Yes I have said in my question that order place time is correct.

              – Vinaya Maheshwari
              Mar 10 '16 at 6:37











            • did you refresh the cache? delete var/cache folder because for after these it good to go

              – Qaisar Satti
              Mar 10 '16 at 6:39











            • Yes I refresh cache from backend and also remove from var/cache folder.

              – Vinaya Maheshwari
              Mar 10 '16 at 6:46













            7












            7








            7







            you have to set your timezone manually



            first go to



            app/etc/config.xml add your time zone here



            <general>
            <locale>
            <code>en_US</code>
            <timezone>Asia/Calcutta</timezone>
            </locale>
            </general>


            second go to app/Mage.php



            on line 768



            change this line too



            date_default_timezone_set('UTC');



            to your timezone



            date_default_timezone_set('Asia/Calcutta');






            share|improve this answer













            you have to set your timezone manually



            first go to



            app/etc/config.xml add your time zone here



            <general>
            <locale>
            <code>en_US</code>
            <timezone>Asia/Calcutta</timezone>
            </locale>
            </general>


            second go to app/Mage.php



            on line 768



            change this line too



            date_default_timezone_set('UTC');



            to your timezone



            date_default_timezone_set('Asia/Calcutta');







            share|improve this answer












            share|improve this answer



            share|improve this answer










            answered Mar 10 '16 at 6:29









            Qaisar SattiQaisar Satti

            27k1256109




            27k1256109












            • Hello @Qaisar Satti, please read my question, both changes I have already made but the problem is Mage::getModel('core/date')->date('Y-m-d H:i:s') function return me incorrect time +5:30 to real time. Is there any place where I missed to change?

              – Vinaya Maheshwari
              Mar 10 '16 at 6:34











            • did you check with new order time is correct?

              – Qaisar Satti
              Mar 10 '16 at 6:35











            • Yes I have said in my question that order place time is correct.

              – Vinaya Maheshwari
              Mar 10 '16 at 6:37











            • did you refresh the cache? delete var/cache folder because for after these it good to go

              – Qaisar Satti
              Mar 10 '16 at 6:39











            • Yes I refresh cache from backend and also remove from var/cache folder.

              – Vinaya Maheshwari
              Mar 10 '16 at 6:46

















            • Hello @Qaisar Satti, please read my question, both changes I have already made but the problem is Mage::getModel('core/date')->date('Y-m-d H:i:s') function return me incorrect time +5:30 to real time. Is there any place where I missed to change?

              – Vinaya Maheshwari
              Mar 10 '16 at 6:34











            • did you check with new order time is correct?

              – Qaisar Satti
              Mar 10 '16 at 6:35











            • Yes I have said in my question that order place time is correct.

              – Vinaya Maheshwari
              Mar 10 '16 at 6:37











            • did you refresh the cache? delete var/cache folder because for after these it good to go

              – Qaisar Satti
              Mar 10 '16 at 6:39











            • Yes I refresh cache from backend and also remove from var/cache folder.

              – Vinaya Maheshwari
              Mar 10 '16 at 6:46
















            Hello @Qaisar Satti, please read my question, both changes I have already made but the problem is Mage::getModel('core/date')->date('Y-m-d H:i:s') function return me incorrect time +5:30 to real time. Is there any place where I missed to change?

            – Vinaya Maheshwari
            Mar 10 '16 at 6:34





            Hello @Qaisar Satti, please read my question, both changes I have already made but the problem is Mage::getModel('core/date')->date('Y-m-d H:i:s') function return me incorrect time +5:30 to real time. Is there any place where I missed to change?

            – Vinaya Maheshwari
            Mar 10 '16 at 6:34













            did you check with new order time is correct?

            – Qaisar Satti
            Mar 10 '16 at 6:35





            did you check with new order time is correct?

            – Qaisar Satti
            Mar 10 '16 at 6:35













            Yes I have said in my question that order place time is correct.

            – Vinaya Maheshwari
            Mar 10 '16 at 6:37





            Yes I have said in my question that order place time is correct.

            – Vinaya Maheshwari
            Mar 10 '16 at 6:37













            did you refresh the cache? delete var/cache folder because for after these it good to go

            – Qaisar Satti
            Mar 10 '16 at 6:39





            did you refresh the cache? delete var/cache folder because for after these it good to go

            – Qaisar Satti
            Mar 10 '16 at 6:39













            Yes I refresh cache from backend and also remove from var/cache folder.

            – Vinaya Maheshwari
            Mar 10 '16 at 6:46





            Yes I refresh cache from backend and also remove from var/cache folder.

            – Vinaya Maheshwari
            Mar 10 '16 at 6:46











            0














            Your locale settings are defined in the configuration under System => Configuration => General => Locale Options =>Timezone, and can be set per website scope.



            You can quickly get/change in your core_config_data table (SELECT * FROM core_config_data WHERE path = 'general/locale/timezone';).



            You might use Mage::getModel('core/date') for getting current time and date.




            Getting formatted date based on locale settings:



            echo Mage::getModel('core/date')->date('d/m/Y H:i:s');
            # return 22/10/2017 23:30:21

            echo Mage::getModel('core/date')->timestamp();
            # return current timestamp

            echo date('d/m/Y H:i:s', Mage::getSingleton('core/date')->gmtTimestamp());
            # returo current date in GMT timezone, doesn't matter your locale settings


            enter image description here
            See app/code/core/Mage/Core/Model/Date.php for a complete list of methods available.



            My suggestion is: try to convert everything to GMT using this model's GMT methods, and stop worrying about php.ini, magento XML, and so on.






            share|improve this answer





























              0














              Your locale settings are defined in the configuration under System => Configuration => General => Locale Options =>Timezone, and can be set per website scope.



              You can quickly get/change in your core_config_data table (SELECT * FROM core_config_data WHERE path = 'general/locale/timezone';).



              You might use Mage::getModel('core/date') for getting current time and date.




              Getting formatted date based on locale settings:



              echo Mage::getModel('core/date')->date('d/m/Y H:i:s');
              # return 22/10/2017 23:30:21

              echo Mage::getModel('core/date')->timestamp();
              # return current timestamp

              echo date('d/m/Y H:i:s', Mage::getSingleton('core/date')->gmtTimestamp());
              # returo current date in GMT timezone, doesn't matter your locale settings


              enter image description here
              See app/code/core/Mage/Core/Model/Date.php for a complete list of methods available.



              My suggestion is: try to convert everything to GMT using this model's GMT methods, and stop worrying about php.ini, magento XML, and so on.






              share|improve this answer



























                0












                0








                0







                Your locale settings are defined in the configuration under System => Configuration => General => Locale Options =>Timezone, and can be set per website scope.



                You can quickly get/change in your core_config_data table (SELECT * FROM core_config_data WHERE path = 'general/locale/timezone';).



                You might use Mage::getModel('core/date') for getting current time and date.




                Getting formatted date based on locale settings:



                echo Mage::getModel('core/date')->date('d/m/Y H:i:s');
                # return 22/10/2017 23:30:21

                echo Mage::getModel('core/date')->timestamp();
                # return current timestamp

                echo date('d/m/Y H:i:s', Mage::getSingleton('core/date')->gmtTimestamp());
                # returo current date in GMT timezone, doesn't matter your locale settings


                enter image description here
                See app/code/core/Mage/Core/Model/Date.php for a complete list of methods available.



                My suggestion is: try to convert everything to GMT using this model's GMT methods, and stop worrying about php.ini, magento XML, and so on.






                share|improve this answer















                Your locale settings are defined in the configuration under System => Configuration => General => Locale Options =>Timezone, and can be set per website scope.



                You can quickly get/change in your core_config_data table (SELECT * FROM core_config_data WHERE path = 'general/locale/timezone';).



                You might use Mage::getModel('core/date') for getting current time and date.




                Getting formatted date based on locale settings:



                echo Mage::getModel('core/date')->date('d/m/Y H:i:s');
                # return 22/10/2017 23:30:21

                echo Mage::getModel('core/date')->timestamp();
                # return current timestamp

                echo date('d/m/Y H:i:s', Mage::getSingleton('core/date')->gmtTimestamp());
                # returo current date in GMT timezone, doesn't matter your locale settings


                enter image description here
                See app/code/core/Mage/Core/Model/Date.php for a complete list of methods available.



                My suggestion is: try to convert everything to GMT using this model's GMT methods, and stop worrying about php.ini, magento XML, and so on.







                share|improve this answer














                share|improve this answer



                share|improve this answer








                edited Oct 27 '17 at 3:05

























                answered Oct 27 '17 at 0:34









                Ricardo MartinsRicardo Martins

                648520




                648520



























                    draft saved

                    draft discarded
















































                    Thanks for contributing an answer to Magento Stack Exchange!


                    • Please be sure to answer the question. Provide details and share your research!

                    But avoid


                    • Asking for help, clarification, or responding to other answers.

                    • Making statements based on opinion; back them up with references or personal experience.

                    To learn more, see our tips on writing great answers.




                    draft saved


                    draft discarded














                    StackExchange.ready(
                    function ()
                    StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fmagento.stackexchange.com%2fquestions%2f105546%2fhow-to-change-magento-timezone%23new-answer', 'question_page');

                    );

                    Post as a guest















                    Required, but never shown





















































                    Required, but never shown














                    Required, but never shown












                    Required, but never shown







                    Required, but never shown

































                    Required, but never shown














                    Required, but never shown












                    Required, but never shown







                    Required, but never shown







                    Popular posts from this blog

                    Bulk add to cart function issuecart vs. mini cart issue … rwd themeRedirect Add to cart button to cart pageAdd to cart issue - Magento 2.1The requested Payment Method is not available When creating an orderM2: reason add-to-cart might not function in production modeAdd to cart issue in some android devicesMagento 2 - custom price can not add to subtotal and grand total after add to cartAdd to cart codeIssue with my cart module on pdp and cart pages, just keeps spinningBulk price and quantity update using rest api

                    БиармияSxpst500bh2ntaf! 3h2r