Skip Navigation

[Résolu] Custom Date Fields & CRED Expiry Field

Ce fil est résolu. Voici une description du problème et la solution proposée.

Problem: Even though the post expiration timestamp in the database is identical to a custom field timestamp in the database, they are displayed on the front-end as different times.

Solution: Custom fields are assumed to be entered as GMT, and will be displayed as GMT. Post expiration is assumed to be entered as local time, and will be displayed as local time. Unfortunately there is no simple workaround right now.

This support ticket is created Il y a 4 années et 7 mois. There's a good chance that you are reading advice that it now obsolete.

This is the technical support forum for Toolset - a suite of plugins for developing WordPress sites without writing PHP.

Everyone can read this forum, but only Toolset clients can post in it. Toolset support works 6 days per week, 19 hours per day.

Aucun de nos assistants n'est disponible aujourd'hui sur le forum Jeu d'outils. Veuillez créer un ticket, et nous nous le traiterons dès notre prochaine connexion. Merci de votre compréhension.

Sun Mon Tue Wed Thu Fri Sat
8:00 – 12:00 8:00 – 12:00 8:00 – 12:00 8:00 – 12:00 8:00 – 12:00 - -
13:00 – 17:00 13:00 – 17:00 13:00 – 17:00 13:00 – 17:00 13:00 – 17:00 - -

Supporter timezone: America/New_York (GMT-04:00)

Marqué : 

Ce sujet contient 4 réponses, a 2 voix.

Dernière mise à jour par julieP Il y a 4 années et 7 mois.

Assisté par: Christian Cox.

Auteur
Publications
#1585113

The timezone for my site is set to London. I don't wish to change this because date/time information in wp-admin needs to be actual timezone (I don't want to have to remember to deduct an hour during summertime). I have a Types custom date field to record/display the date in date/time format. The CRED expiry field also displays in date/time format. Why is it that even when the timestamp in both these fields in the database are the same, the CRED field displays the time as an hour later? This doesn't make any sense.

#1585993

Hi, yes I agree it's quite confusing. The simple explanation is when a post is saved, the custom field is assumed to be saved as GMT and will be displayed as GMT, while the expiration is assumed to be saved in WP local time and will be displayed as WP local time. The display here reflects that discrepancy, and unfortunately there's not a simple workaround right now.

#1586243

Is it Toolset's intention to address it at some point though?

#1586957

Yes I think the expiration and notification date systems need an overhaul in general, so if you'd like to see that happen sooner than later I suggest letting our management know by filing a request here: https://toolset.com/home/contact-us/suggest-a-new-feature-for-toolset/

#1588459

Thank you - I'll do that!