Forums

The forums ran from 2008-2020 and are now closed and viewable here as an archive.

Home Forums Back End Change php time to Custom and Dynamic

  • This topic is empty.
Viewing 7 posts - 1 through 7 (of 7 total)
  • Author
    Posts
  • #42803
    pedram
    Member

    Hi, i use this php snip to show time in my forum, it’s static time, i want to change to dynamic. and want to change date,but unfortunately it take order from server, is there a way to change it? without tell to server support?

    ‘, $context,’

    #124948
    chrisburton
    Participant
    #124963
    pedram
    Member

    Thanks, but it only change time zone, i want to change date, i’m live in Asia, and my date is different. for example, today not 17 feb 2013.

    #124965

    @pedram if php doesn’t work for you use sql instead:

    $querydate = "SELECT now()";
    $nowdate = $wpdb->get_var( $wpdb->prepare($querydate, 1));
    #124967
    chrisburton
    Participant

    Hmm. Not sure if PHP will work since it runs off the server. I’m not familiar with SQL so try the above.

    #124973
    pedram
    Member

    @mostafaghanbari , thanks but i’m not familiar with SQL too.
    can you explain more about it? how can i use it?

    in fact i want to change my date to JALALI (Persian date) , just day and year, not months name.
    for ex.

    today is
    Sunday 17 Feb 2013… i want to change it to:
    Sunday 29 Feb 1391

    i change “Feb” in language files manually.

    #124987
    pedram
    Member

    Thanks guys, problem solved.
    i’v used a jalali php class and require_once, and it works.

Viewing 7 posts - 1 through 7 (of 7 total)
  • The forum ‘Back End’ is closed to new topics and replies.