Forum

Thread tagged as: Question, Problem, Shop

Timezone + Shop orderCreated

I have set my timezone via the config file to Bogota time like so:

define('PERCH_TZ', 'America/Bogota');

I've just been doing some testing and after purchasing a product and being redirected to the order confirmation page, my order created date is showing as GMT. It's output using:

<perch:shop id="orderCreated" type="date" format="d F Y, H:i" />

I was expecting it to output the date/time for the timezone I set up in config.

Stephen Turvey

Stephen Turvey 0 points

  • 3 years ago
Drew McLellan

Drew McLellan 2638 points
Perch Support

Yes, I would expect that too. Can you post your diagnostics report?

Perch: 3.1.1, PHP: 7.1.10-1+ubuntu16.04.1+deb.sury.org+1, MySQL: mysqlnd 5.0.12-dev - 20150407 - $Id: b396954eeb2d1d9ed7902b8bae237b287f21ad9e $, with PDO
Server OS: Linux, fpm-fcgi
Installed apps: content (3.1.1), assets (3.1.1), categories (3.1.1), perch_forms (1.11), perch_shop_orders (1.2.6), perch_shop_products (1.2.6), perch_shop (1.2.6), perch_members (1.6.4)
App runtimes: <?php $apps_list = [ 'perch_members', 'perch_forms', 'perch_shop', ];
PERCH_LOGINPATH: /members
PERCH_PATH: /home/forge/www.medellinclassifieds.com/members
PERCH_CORE: /home/forge/www.medellinclassifieds.com/members/core
PERCH_RESFILEPATH: /home/forge/www.medellinclassifieds.com/members/resources
Image manipulation: GD Imagick
PHP limits: Max upload 10M, Max POST 10M, Memory: 512M, Total max file upload: 10M
F1: 3b606135b33e6a102526838f4152a807
Resource folder writeable: Yes
HTTP_HOST: www.medellinclassifieds.com
DOCUMENT_ROOT: /home/forge/www.medellinclassifieds.com
REQUEST_URI: /members/core/settings/diagnostics/
SCRIPT_NAME: /members/core/settings/diagnostics/index.php

Please can you look into this or let me know if you need more information. Thanks

Drew McLellan

Drew McLellan 2638 points
Perch Support

Yes, we'll certainly be looking into it.

Small update: I noticed too that the GMT time is displayed in the admin for the forms addon where it says when the 'Most recent' form was submitted. So it's as if Perch as a whole is ignoring the PERCH_TZ config setting.

The server itself is based in Texas and my current location is the UK (BST) so can't figure out where GMT would be coming from...

Drew McLellan

Drew McLellan 2638 points
Perch Support

The GMT is because everything is stored as GMT (or UTC, but same thing) and then shifted for timezone from there.

Hi Drew. Has this been confirmed as a bug yet?

Drew McLellan

Drew McLellan 2638 points
Perch Support

It certainly sounds like a bug, but I've not been working on Shop yet, so I've not looked into it.