strtotime returns strange characters
I want to show date of events created via custom post type and ACF in Wordpress. I try to figure out why this:
<?php setlocale(LC_TIME, 'fr_FR'); echo strftime('%d %h %Y', strtotime(get_field('date_de_levenement'))); ?>
returns strange characters like this:
04 ao�t 2014
(Here the 04 ao�t 2014 should be 04 août 2014
I solved the problem with this!
So I get
<?php setlocale(LC_TIME, 'fr_FR'); define("CHARSET", "utf-8"); echo utf8_encode (strftime('%d %h %Y', strtotime(get_field('date_de_levenement')))); ?>
PHP strtotime needs adjustment
I'm working on a php function to calculate total time between two user-input time fields from a wordpress forms plugin, but the function is not working when the times cross 2400 hours. Here's the exact situation: I'm trying to calculate how long a user slept but I get a negative number when the start time is in the evening (23:00 for example) and t...
How to show date in php. using getFormatDateTime and strtotime
Before I start I should mention that I have no knowledge about coding, so please bear with me if my question doesn't make sense. I bought a plugin for taxi reservation for wordpress. Everything works fine except that when the user picks the date after checking out in woocommerce the reservation date and time is changed to: 01-01-1970 12:00 AM and t...
strtotime() not converting string to timestamp
I am trying to convert a string to a timestamp but it is just not happening. This has gone above my expertise and from my googling, it looks like I shouldn't be seeing what I am seeing so I am thinking there is a bigger problem I am missing. I am getting a date string from a WordPress function and then trying to use PHP to convert it. All I want fr...
Strtotime can't be used for comparison with meta value
I'm using WooCommerce, and trying to check for late payments. Any orders paid after 6 pm (sometimes the payment gateway is a bit slow) every day, got put back to 'on-hold' status. I want this treatment to apply only to orders with tomorrow delivery dates. This is not working (the 'on-hold' status never implemented): BUT, this is working: The only d...
strange characters in wordpress website displayed for visitors
Apparently a lot of people complain that they only see random letters and characters: My biggest problem is that I can't reproduce the problem on ANY of my devices! Not on my Windows XP laptop, not on my Windows 7 laptop, not on my Android phone or my iPod Touch. It doesn't matter which browser I'm using. The only time I see the problem myself is w...
WordPress showing strange characters - UTF8
I've just changed webserver but are having some problems with the encoding of the new site. I have exported part of my WordPress site from my old webhost and imported into my new WordPress multsite setup. Everything looks fine from the database, but when viewing the site within WordPress it's all messed up with strange characters. The content is in...