WordPress.org

Support

Support » Plugins and Hacks » [Resolved] Date formatting

[Resolved] Date formatting

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

    @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.

    $av[‘fc_date_format’]=get_option(“date_format”);
    $av[‘fc_time_format’]=get_option(“time_format”);

    crabbster
    Member

    @crabbster

    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!
    Kim

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

    Plugin Author tuxlog
    Participant

    @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.

    crabbster
    Member

    @crabbster

    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:
    http://www.sockerswi.org/images/blogtimezonesettings.jpg

    Fishy iFrame code:
    http://www.sockerswi.org/images/wp-forecast_iFramescreenshot.jpg

    It seems like everything’s in order…

    Plugin Author tuxlog
    Participant

    @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 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 🙂

    crabbster
    Member

    @crabbster

    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!

    Plugin Author tuxlog
    Participant

    @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 ‘[Resolved] Date formatting’ is closed to new replies.