Jump to content

Retrive Date and time


30ml
 Share

Recommended Posts

Timezone is set globally for the shop in config.inc.php, so you wont have to worry about that.

(If you for any reason need it, you can get it from Configuration::get('PS_TIMEZONE'))

The current languages' formats are stored in the current Language object, usually retrieved from

$this->context->language->date_format_lite and
$this->context->language->date_format_full

Check out Tools::displayDate if you have a date string, otherwise just use php's date() function along with
desired format.

  • Like 2

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

×
×
  • Create New...

Important Information

Cookies ensure the smooth running of our services. Using these, you accept the use of cookies. Learn More