Support » Plugin: wp-forecast » Date formatting

Viewing 7 replies - 1 through 7 (of 7 total)
  • Plugin Author tuxlog


    Hi Tafra,

    wp-forecast uses the date format of your blog.
    If you want to change this you can edit funclib.php at line 286/287.


    Hey there!
    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.

    Thanks much!

    P.S. I am VERY new to PHP programming if you can’t tell. 🙂

    Plugin Author tuxlog


    Hello Kim,

    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):

    Widget settings: (I also tried clicking “use current time” checkbox and it had no effect)

    Blog timezone settings:

    Fishy iFrame code:

    It seems like everything’s in order…

    Plugin Author tuxlog


    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 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 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:
    No more fish!

    YOU are the pro, and a speedy one at that! 🙂 Thanks so much and have a great rest of your Sunday!

    Plugin Author tuxlog


    Hello Kim,

    great it worked. I will add this functionality to the next release.
    Thank you for the hints on this and have nice Sunday.

Viewing 7 replies - 1 through 7 (of 7 total)
  • The topic ‘Date formatting’ is closed to new replies.