Forum

Thread tagged as: Question, Forum

Wrong Timezone

Hi all,

In Perch Admin, when I edit content, the Last updated field is always an hour ahead... Any ideas why? The timezone is set to UTC.

Thanks.

Conor Harkins

Conor Harkins 0 points

  • 3 years ago

The last login time works fine btw...

Drew McLellan

Drew McLellan 2638 points
Perch Support

What's your server's clock set to?

My server clock is correct. As I said, when I login to Perch it displays the correct time in the Manage Users section. However, when I modify a region, the time is always an hour ahead...

Drew McLellan

Drew McLellan 2638 points
Perch Support

When you say correct, you mean that it's set to UTC also?

Yes. My Perch installation is set to UTC but for some reason the Editing 'PAGE NAME' Page page displays the wrong time. I'm at a loss to what the problem is...

I can’t find anything wrong with the server time...

Hussein Al Hammad

Hussein Al Hammad 105 points
Registered Developer

I think Perch uses the server's time by default. If the server's timezone is set to UTC, then UTC should be used.

Have you tried setting the timezone in your perch/config/config.php?

define('PERCH_TZ', 'UTC');

Hi Hussein,

I have so far tried everything mentioned but nothing seems to do the trick.

As I said above, the date is strangely correct in the Manage Users page to show when the user last logged in. But is an hour ahead in the Edit Regions pages.

It’s not causing any problems, I just need to remember that it’s an hour out.

Oh! And I have code on my pages that show the last time that page was updated and that shows the correct date and time. Just not correct within Perch admin.

Drew McLellan

Drew McLellan 2638 points
Perch Support

The page modified time and the user last login are both set in the same way (basically using date('Y-m-d H:i:s')).

They both show the same, accurate timestamp here for me. Can you post your full diagnostic report?

I understand they should both be set in the same way. However, they are not. It might be something really stupid that I messed up but I can't see it.

Perch Runway: 3.0.11
Production mode: Production (100)
Installed apps: content (3.0.11), assets (3.0.11), categories (3.0.11), perch_forms (1.10), perch_comments (1.2.1), perch_members (1.6.1), ketterus_profiles (2.0.0), perch_mailchimp (3.1)
DB driver: PDO
DB tables: perch3_backup_plans (0), perch3_backup_resources (0), perch3_backup_runs (0), perch3_categories (0), perch3_category_counts (0), perch3_category_sets (0), perch3_collection_index (0), perch3_collection_items (0), perch3_collection_revisions (0), perch3_collections (0), perch3_comments (3), perch3_comments_votes (0), perch3_content_index (143), perch3_content_items (24), perch3_content_locks (0), perch3_content_regions (10), perch3_forms (2), perch3_forms_responses (6), perch3_ketterus_profiles_profiles (11), perch3_ketterus_profiles_resource_log (0), perch3_ketterus_profiles_resources (0), perch3_ketterus_profiles_tokens (11), perch3_mailchimp_campaigns (0), perch3_mailchimp_imports (0), perch3_mailchimp_lists (1), perch3_mailchimp_subscribers (2), perch3_mailchimp_subscriptions (2), perch3_mailchimp_webhooks (1), perch3_members (3), perch3_members_forms (1), perch3_members_member_tags (4), perch3_members_sessions (2), perch3_members_tags (3), perch3_menu_items (13), perch3_navigation (0), perch3_navigation_pages (0), perch3_page_routes (8), perch3_page_templates (30), perch3_pages (19), perch3_resource_log (0), perch3_resource_tags (0), perch3_resources (0), perch3_resources_to_tags (0), perch3_settings (31), perch3_user_passwords (2), perch3_user_privileges (44), perch3_user_role_buckets (0), perch3_user_role_privileges (2), perch3_user_roles (2), perch3_users (2)
Users: 2
App runtimes:
<?php

    $apps_list = [
        'perch_members',
        'perch_forms',
        'perch_mailchimp',
        'perch_comments',
        'ketterus_profiles'
    ];
Scheduled tasks for perch_comments: delete_spam_comments (1440 mins)
Scheduled tasks for perch_mailchimp: import_data (1 mins)
Editor plug-ins:
H1: 4c0316e3f909ad1bce2c2bc264fd593a
L1: 26cddbd81d146fe0a9628699aa32a188
F1: 3b606135b33e6a102526838f4152a807
headerColour: #74d1cf
content_singlePageEdit: 1
helpURL:
siteURL: /
hideBranding: 1
content_collapseList: 1
lang: en-gb
installedAt: 3.0.11
update_3.0.11: done
headerScheme: light
update_runway_3.0.11: done
latest_version:
on_sale_version: 3.0.13
perch_members_update: 1.4
perch_members_login_page: /login?r={returnURL}
dashboard: 1
sidebar_back_link: 1
hide_pwd_reset: 0
keyboardShortcuts: 0
siteOffline: 0
content_hideNonEditableRegions: 0
content_frontend_edit: 0
content_skip_region_list: 0
assets_restrict_buckets: 0
perch_mailchimp_api_key: 06abffa6459ec6853c95e5bc49d49324-us16
perch_mailchimp_campaign_url: /mailchimp/campaign/{campaignSlug}
perch_mailchimp_secret: 432e374
ketterus_profiles_login_page: /portal/login?r={returnURL}
ketterus_profiles_secure_upload_path:
ketterus_profiles_upload_thumb_path:
ketterus_profiles_upload_thumb_web_path: /assets/uploads/thumbs
PERCH_DEVELOPMENT: 10
PERCH_STAGING: 50
PERCH_PRODUCTION: 100
PERCH_SITEPATH: /home/fz2d7e2l/public_html
PERCH_SCHEDULE_SECRET: FoZt4vJXJakOIN4Z
PERCH_DB_USERNAME: fz2d7e2l_admin
PERCH_DB_SERVER: localhost
PERCH_DB_DATABASE: fz2d7e2l_perch_cms
PERCH_DB_PREFIX: perch3_
PERCH_DEBUG:
PERCH_SITE_BEHIND_LOGIN: 1
PERCH_EMAIL_FROM: admin@ardnaheincare.co.uk
PERCH_EMAIL_FROM_NAME: Conor Harkins
PERCH_LOGINPATH: /perch
PERCH_PATH: /home/fz2d7e2l/public_html/perch
PERCH_CORE: /home/fz2d7e2l/public_html/perch/core
PERCH_RESFILEPATH: /home/fz2d7e2l/public_html/perch/resources
PERCH_RESPATH: /perch/resources
PERCH_HTML5: 1
PERCH_TZ: UTC
PERCH_MEMBERS_SESSION_TIME: 1 HOUR
PERCH_RUNWAY: 1
PERCH_ERROR_MODE: DIE
PERCH_DATE_LONG: %d %B %Y
PERCH_DATE_SHORT: %d %b %Y
PERCH_TIME_SHORT: %H:%M
PERCH_TIME_LONG: %H:%M:%S
PERCH_RUNWAY_ROUTED:
PERCH_STRONG_PASSWORDS:
PERCH_ASSET_VERSION: f704e7442d11292c99b5
PERCH_PREVIEW_ARG: preview
PERCH_TEMPLATE_PATH: /home/fz2d7e2l/public_html/perch/templates
PERCH_TEMPLATE_FILTERS:
PERCH_DEFAULT_DOC: index.php
PERCH_DEFAULT_EXT: .php
PERCH_PRODUCTION_MODE: 100
PERCH_XHTML_MARKUP:
PERCH_RWD: 1
PERCH_HTML_ENTITIES:
PERCH_SSL:
PERCH_STRIPSLASHES:
PERCH_PROGRESSIVE_FLUSH: 1
PERCH_PARANOID:
PERCH_FORCE_SECURE_COOKIES:
PERCH_DEFAULT_BUCKET: default
PERCH_TRANSLATION_ASSIST:
PERCH_PASSWORD_MIN_LENGTH: 6
PERCH_MAX_FAILED_LOGINS: 10
PERCH_AUTH_LOCKOUT_DURATION: 1 HOUR
PERCH_VERIFY_UPLOADS:
PERCH_PRIV_ASSIST:
PERCH_CUSTOM_EDITOR_CONFIGS:
PERCH_ENABLE_EXIF: 1
PERCH_AUTH_PLUGIN:
PERCH_DB_CHARSET: utf8
PERCH_DB_PORT:
PERCH_DB_SOCKET:
PERCH_APPS_EDITOR_PLUGIN: markitup
PERCH_APPS_EDITOR_MARKUP_LANGUAGE: markdown
Hosting settings
PHP: 5.6.31
Zend: 2.6.0
OS: Linux
SAPI: litespeed
Safe mode: not detected
MySQL client: 5.6.35
MySQL server: 5.6.35-cll-lve
Free disk space: 1.17 TB
Extensions: Core, date, ereg, libxml, openssl, pcre, sqlite3, zlib, bz2, calendar, ctype, curl, hash, filter, ftp, gettext, gmp, SPL, iconv, pcntl, readline, Reflection, session, standard, shmop, SimpleXML, mbstring, tokenizer, xml, litespeed, mysqli, imap, mysqlnd, bcmath, json, dom, soap, PDO, sockets, xmlreader, xmlwriter, gd, exif, pdo_mysql, mcrypt, pdo_sqlite, zip, Phar, mysql, posix, mhash
GD: Yes
ImageMagick: No
PHP max upload size: 128M
PHP max form post size: 128M
PHP memory limit: 128M
Total max uploadable file size: 128M
Resource folder writeable: Yes
Session timeout: 24 minutes
Native JSON: Yes
Filter functions: Yes
Transliteration functions: No
PATH: /usr/local/bin:/usr/bin:/bin
PWD: /
HTTP_ACCEPT: text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,image/apng,*/*;q=0.8
HTTP_ACCEPT_ENCODING: gzip, deflate
HTTP_ACCEPT_LANGUAGE: en-US,en;q=0.9
HTTP_CONNECTION: keep-alive
HTTP_COOKIE: _pk_id.2.be82=0f9d1af3f6e20d29.1507297992.1.1507297992.1507297992.; _ga=GA1.3.1186828863.1508962267; Ardnahein-Care-Cookie-Acceptance=dismiss; cmsa=1; PHPSESSID=be671lt3rfa5ojd8gqe9flvku1
HTTP_HOST: ardnaheincare.co.uk
HTTP_REFERER: https://ardnaheincare.co.uk/perch/core/settings/diagnostics/
HTTP_USER_AGENT: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/63.0.3239.132 Safari/537.36
HTTP_UPGRADE_INSECURE_REQUESTS: 1
UNIQUE_ID: WlPI-LkCBHAABjW1s3kAAAA-
SCRIPT_URL: /perch/core/settings/diagnostics/
SCRIPT_URI: https://ardnaheincare.co.uk/perch/core/settings/diagnostics/
SERVER_SOFTWARE: Apache
SERVER_NAME: ardnaheincare.co.uk
SERVER_ADDR: 185.2.4.112
SERVER_PORT: 80
REMOTE_ADDR: 81.132.157.143
DOCUMENT_ROOT: /home/fz2d7e2l/public_html
REQUEST_SCHEME: http
CONTEXT_DOCUMENT_ROOT: /home/fz2d7e2l/public_html
SERVER_ADMIN: webmaster@ardnaheincare.co.uk
SCRIPT_FILENAME: /home/fz2d7e2l/public_html/perch/core/settings/diagnostics/index.php
REMOTE_PORT: 54025
SERVER_PROTOCOL: HTTP/1.1
REQUEST_METHOD: GET
QUERY_STRING: extended
REQUEST_URI: /perch/core/settings/diagnostics/?extended
SCRIPT_NAME: /perch/core/settings/diagnostics/index.php
PHP_SELF: /perch/core/settings/diagnostics/index.php
REQUEST_TIME_FLOAT: 1515440380.236
REQUEST_TIME: 1515440380
Drew McLellan

Drew McLellan 2638 points
Perch Support

I understand they should both be set in the same way. However, they are not.

They are set the same way. I'm not sure why you're seeing an hour difference, but I can't reproduce that behaviour.