HummingbirdUK main logo

HummingbirdUK

Coding solutions to business problems

About us

We use code to create solutions to business challenges, bottle-necks and headaches.

If you think your business has a problem that can be solved through code, we are happy to chat things through without any obligation.

Get in touch

Find out what time Magento thinks it is

Home / Blog / Find out what time Magento thinks it is

Written by Giles Bennett

Depending on the locality settings, "Magento time" can be different from your server's time, and both can be different from the actual time where you are. If you need to find out in a hurry what time Magento thinks it is, then the following script just asks it to tell you by outputting it to the screen. Download the file below, upload it to your web root folder via FTP, then hit it in your browser and you're done! [php] <?php require_once 'app/Mage.php'; umask(0); Mage::app(); echo date("Y-m-d H:i:s", Mage::getModel('core/date')->timestamp(time())); ?> [/php]
Author : Giles Bennett

About the author

Giles Bennett built his first website in 1996, and is old enough to miss Netscape Navigator. Initially a lawyer, he jumped ship to IT in 2008, and after 5 years as a freelancer, he founded HummingbirdUK in 2013. He can be reached by email at giles@hummingbirduk.com.