0
votes
3answers
39 views

Comparing Dates from custom field

I am trying to compare dates from a custom field. I have them stored as something like "20121125". If the date has expired, a placeholder image will be used, if not, the default thumbnail will be ...
2
votes
2answers
82 views

Unable to set right time in admin and frontend template

When I run a simple php file called test.php (placed in the root of the wp installation) that contains something like that: <?php echo date('H:i:s'); ?> The result is right: 15:30:00 and the ...
3
votes
3answers
2k views

Converting timestamps to local time with date_l18n()

I've got a WordPress cron job that sends an email periodically and saves the timestamp when it was sent as an option, and I'd like to display a date on a settings page. Something like, "The last ...
0
votes
2answers
162 views

Can i show items based on the day with php?

I have a code on my site that displays different headers for different post types using the if ( get_post_type() == 'post type here' ) { code but is there a way i can do this for days of the week? ...
1
vote
1answer
133 views

Displaying custom field according to date

I am not sure whether this is an Advanced Custom Fields-related question, or a general PHP question, so I have also posted this to the ACF support forum, for those of you who are also looking for ...
0
votes
1answer
325 views

Get date function not working

I have a function to get the date. I have input fields and want the date in this fields. But my code is set a wrong date. I set the date in Wordpress settings and on my server. But it is not working. ...
0
votes
1answer
351 views

PHP time function ($today) for GMT +1

I tried a lot - But the code at the bottom is always 1 hour behind the local time. It might be a problem of the server-time. But I want to use it for a german website - So I have to set the time to ...
0
votes
1answer
2k views

Convert a date to ISO8601 date format

This is more of a PHP question than a WordPress one. I have a custom post type event that by default outputs the date as "September 11, 2011 9:00 am" format. I'm trying to format the post in ...
1
vote
4answers
1k views

wrong php date()?

hey guys, it's weird and I've never experienced that before. I've created a new blog and a custom theme. I'm using <?php echo date("H:i"); ?>in my theme. The time that's put is 2h earlier. ...
12
votes
3answers
9k views

How to get WordPress Time Zone setting?

Can someone tell me how to get the time zone that is set in the WordPress Admin? For example, if the blog is set to Eastern time, I need this exact string to print out: US/Eastern This is for a ...
1
vote
1answer
338 views

Why does this echo values in the wrong order?

I'm sure there is a simple reason/answer for this: Why does echo 'Archive for '. the_time('Y'); give me 2010Archive for? I had expected it would give me Archive for 2010
0
votes
3answers
2k views

I get “The PHP Date/Time library is not supported by your web host.” on my CentOS host, what library to I need to install to add support?

I did some quick looking around, but my PHP skills are pretty nascent. I am sure there is just a package that needs installing. Edit to add additional information about the setup: Using: yum info ...