[Resolved] Date formatting
wp-forecast uses the date format of your blog.
If you want to change this you can edit funclib.php at line 286/287.
First of all tuxlog, thanks for all your work and prompt replies to posts. I’m having difficulties with changing the time format. What needs to be replaced in “get_option(“time_format”)? I tried to replace it with PHP time formatting code but couldn’t get it to work. I need to change 17:36 to 2:36 pm.
So $av[‘fc_time_format’] = what’s here?;
I tried variations of
$av['fc_time_format']= 'g:i A';but couldn’t get it to work.
P.S. I am VERY new to PHP programming if you can’t tell. 🙂
changing time from 17:36 to 2:36 pm is not only a formatting matter. It is also a timezone matter. right?
Lets start with the format. Which format do you use in your Blog and should it be the same as you like in wp-forecast? wp-forecast takes the same format as your Blog does.
g:i A looks allwright to me. What exactly does not work?
Now the second part. Which timezone is set in your Blog and what timezone do you like in wp-forecast? You can adjust this in the admin dialog for each widget.
I do have my blog set to CST timezone and have the time set to display as 2:00 pm which is what I would like it to be in wp-forecast. What’s also kind of fishy is that the iframe language is set at de-DE but it should be en-US. Below are links to screen shots of all these elements.
What it looks like (can’t see it live because it’s on my local machine): http://www.sockerswi.org/images/wp-forecastScreenprint.jpg
Widget settings: (I also tried clicking “use current time” checkbox and it had no effect) http://www.sockerswi.org/images/wp-forecast_widgetsettings.jpg
Blog timezone settings:
Fishy iFrame code:
It seems like everything’s in order…
Ahhhhh, I was on the wrong track…
1. wrong sunrise time format –> until now wp-forecast only formats the current time not the sunrise time. But you are right it should be convert these too. Please fetch https://dl.dropbox.com/u/107546706/func_accu.php and try if its better now
2. wrong header in iFrame –> de-DE was hardcoded in it, I now changed this to the language the widget uses. Please fetch https://dl.dropbox.com/u/107546706/wp-forecast-show.php and try it
I am not sure if we have a 3. with your timezone. Maybe we should do 1. and 2. first. You are really a pro, Kim 🙂
That all makes sense, I didn’t even think about the sunrise/sunset being different. Glad I included my handy screen prints otherwise we would have had quite the go-round. I love screen prints. 🙂
Sunrise / sunset happiness: http://www.sockerswi.org/images/wp-forecastScreenprintBAM.jpg
No more fish! http://www.sockerswi.org/images/wp-forecast_iFramescreenshotBAM.jpg
YOU are the pro, and a speedy one at that! 🙂 Thanks so much and have a great rest of your Sunday!
- The topic ‘[Resolved] Date formatting’ is closed to new replies.