Blog

Dating Pods

No, not that type of dating ๐Ÿ™‚

Talking about the Pods usage of date(), we should at all times use date_i18n() instead, which has two params just like date() which are $format and $timestamp. This ensures all places where a date is shown is set to the correct timezone that the WP site is set to. Any time we need to do a time() we should use current_time(‘timestamp’) and alternatively we can easily use current_time(‘mysql’) to get the current MySQL Date formated date + time.

A separate issue, I’m not sure if we need to store a GMT version of each date+time too, anyone have any thoughts there? Otherwise I’m leaning towards not storing an additional GMT date+time for every date+time field out in Pods.