vatolin
Member
Posted 7 years ago #
Morning.
I want to define in /wordpress/wp-admin/options-general.php?updated=true that the time in my blog appears in the format G Uhr i (for example: instead of 7:01 pm it should be shown 19 Uhr 01). If I try to define that format by input G Uhr i the output is 19 109225091407Wed, 11 Aug 2004 19:01:54 +0000 01. I know that the Problem is to make PHP ignoring the letters of Uhr. But how can I escape them?
Thanks and regards. Friedrich
There is a link in options to the php date time codes. No need to edit your own php code.
vatolin
Member
Posted 7 years ago #
The link I know and the PHP time codes too. But I want to insert a special word (»Uhr« german for o'clock) instead of »:« between the G-code and the i-code. Imagine you would like to have a time format like »6 o'clock 35 minutes am«. What would you insert into the field for »Default time format: [ ]«?
http://de2.php.net/date
I believe the solution is something like "G \U\h\r i"
HTH.
vatolin
Member
Posted 7 years ago #
Maybe it es something _like_ that. But _this_ is it not. :-(
vatolin
Member
Posted 7 years ago #
Does somebody know the answer now?
Thanks in advance and kind regards. Friedrich
Hi Friedrich
I didn't found it within the php-Site you've mentioned, but you can change it over the Internet-Admin-Interface. Login as Administrator and choose the menu "Options" and go to the Tab "General" (I know - this must be the php-Site you said, but... I couln't find the solution there).
Then... In the field "Default time format:" type in "G:m" and you get away am and pm - but I didn't get out, how you can write "Uhr" behind the time bzw. between the hour and minutes. Greez from Zurich, Elle
Sorry... missed the part about "want to replace the : with Uhr".
I've found a tutorial at http://www.phptutorial.info/learn/datetime.html#localtime
And this might be your solution, which has to be put into the php-Site (does not work over the web-interface):
<?php print date("H") ?> Uhr <?php print date("i") ?>