Support community for TTG plugins and products.
NOTICE
The Turning Gate's Community has moved to a new home, at https://discourse.theturninggate.net.
This forum is now closed, and exists here as a read-only archive.
You are not logged in.
Pages: 1
Hi guys,
I am in the middle of setting up my page and there are a few things I haven't found yet. I will use separate posts for my questions.
In the download page the expiry date format is in the default format "October 15 2017 2:53pm".
In Backlight Settings, Advanced Settings, I found 'Timezone' which I thought would solve the issue. I changed it to "Europe/Stockholm" but I still have the same format on the download page
Offline
We don't support localisation of dates. One option is to change the format to use number and not words. To do so, copy or rename the file backlight/env.php.skel to env.php, and add a DOWNLOAD_EXPIRY_FORMAT entry near the top like this:
<?php
define('DOWNLOAD_EXPIRY_FORMAT', 'd.m.Y g:ia');
The above example will format dates like this:
23.10.2017 10:34pm
To remove the pm, and use 24 time instead, use the format:
<?php
define('DOWNLOAD_EXPIRY_FORMAT', 'd.m.Y H:i');
To swap month for year, swap 'd' and 'm' around. A full list of available options can be found at http://php.net/manual/en/function.date.php
Offline
Worked like a charm!! Thank you for the rapid reply!
Offline
Follow up question; if chagning Backlight Settings, Advanced Settings, 'Timezone' doesn't change this, what does it do? The help text states: "The timezone used for formatting days, such as download expiry"
Offline
That should display the time according to the timezone. For example, if you had set it to Australia/Melbourne and somebody checked out at this very moment, the expiry would show 8.20pm. If set to Sweden, it would say 12.20pm.
Submitting this before the clock changes to 8.21pm.
Offline
Gotcha! Then it is still good that I changed it
Offline
Pages: 1