We build. You grow.

Get best community software here

Start a social network, a fan-site, an education project with oxwall - free opensource community software

Date Format [Solved] | Forum

Topic location: Forum home » Support » General Questions
R. H.
R. H. Nov 9 '10
Hallo!

I maka a german translation and it works good.

But how can I change the Date Format int german variant:

Now: Erstellt: Nov 2 · Admin: Lisa · Melden
I want: Erstellt: 2. Nov · Admin: Lisa · Melden

and

Now: Gestern, 09:29PM
I want: Gestern, 21:29 Uhr

Can I change this on one place in admin? I dont't fount it.

Or must I change it in the core/plugin-code? Where?

I think this question is intersting for many users.

Thank you!
The Forum post is edited by ross Mar 9 '14
Den Team
Den Nov 9 '10
You can change only this:

Quote from Rüdiger Hössel


Now: Erstellt: Nov 2 · Admin: Lisa · Melden

I want: Erstellt: 2. Nov · Admin: Lisa · Melden



Go to Admin Panel->Settings->Main settings->Date Format
Den Team
Den Jul 13 '11
@Leo
"Gestern, 21:29 Uhr" Does it a valid date format? :)
Den Team
Den Aug 8 '11
Mmm, how this format is different from current? Would you give some examples please.
Henrik
Henrik Aug 8 '11
There is an option for so called military time, i.e. 21:29 instead of 09:29 PM. What is still missing is dates on other forms than Nov 2. The germans write 2. Nov and in Sweden we use 2 nov.
The Forum post is edited by Henrik Aug 8 '11
Den Team
Den Aug 9 '11
Regrading change AM/PM to Uhr - it's impossible. 

Don't understand what do you mean with events? :) 
Felix
Felix Sep 28 '11
Well, what he ment, is that we use in Europe is what the call in Amerca military time, in the 24 hour format. We dont use AM/PM over here (netherlands/german, pretty the same) .. So, we write time/date as follows (example): wensday at 13:15 on the 25th of november. Maybe it is possible to embed the use of the time how PHP uses it ? -> http://php.net/manual/en/function.time.php With that option you could never misses the correct time, since php uses the time configuration from the sever you installed on ..
The Forum post is edited by Felix Sep 28 '11
Marcel
Marcel Mar 7 '13
Für die Deutsche Uhrzeit, folgende Datei abändern:

/ow_utilities/date_time.php

Ersetze ab Zeile 76 den Code mit folgendem:

        if ( $onlyDate )
        {
 
        return ( date('y', $timeStamp) === date('y', time()) ) ?
        strftime("%a, %d.%m.%Y", $timeStamp) :
        strftime("%a, %d.%m.%Y", $timeStamp);
        }

        return ( date('y', $timeStamp) === date('y', time()) ) ?
        ( $militaryTime ? strftime("%a, %d.%m.%Y, %H:%M", $timeStamp) : strftime("%a, %d.%m.%Y, %I:%M%p", $timeStamp) ) :
        ( $militaryTime ? strftime("%a, %d.%m.%Y, %H:%M", $timeStamp) : strftime("%a, %d.%m.%Y, %I:%M%p", $timeStamp) );
Jeroen
Jeroen Mar 6 '14

help with europien dates on the newsfeeds


on the right bottem you see

Feb 23 <<< thats the us date notation on newsfeeds

can i change that to europe >>>> 23 Feb


Attachments:
  date.jpg (22.62Kb)
Jeroen
Jeroen Mar 7 '14
i solved my problem.

check allways on a terminal on the server locale -a

then you will get a list of locale installed on the system


i have

CC.UTF-8en_AGen_AG.utf8en_AU.utf8en_BW.utf8en_CA.utf8en_DK.utf8en_GB.utf8en_HK.utf8en_IE.utf8en_INen_IN.utf8en_NGen_NG.utf8en_NZ.utf8en_PH.utf8en_SG.utf8en_US.utf8en_ZA.utf8en_ZMen_ZM.utf8en_ZW.utf8nl_NL.utf8


for me i need nl_NL but there is no nl_NL only nl_NL.utf8

there you have my problem.

so on the top of
/ow_utilities/date_time.php

under

<?php put

setlocale (LC_ALL, 'nl_NL.utf8');


and change the if onlydate function to the topic of Marcel


 if ( $onlyDate )
        {
 
        return ( date('y', $timeStamp) === date('y', time()) ) ?
        strftime("%a, %d.%m.%Y", $timeStamp) :
        strftime("%a, %d.%m.%Y", $timeStamp);
        }

        return ( date('y', $timeStamp) === date('y', time()) ) ?
        ( $militaryTime ? strftime("%a, %d.%m.%Y, %H:%M", $timeStamp) : strftime("%a, %d.%m.%Y, %I:%M%p", $timeStamp) ) :
        ( $militaryTime ? strftime("%a, %d.%m.%Y, %H:%M", $timeStamp) : strftime("%a, %d.%m.%Y, %I:%M%p", $timeStamp) );


save and be happy

The Forum post is edited by Jeroen Mar 7 '14
ross Team
ross Mar 9 '14
Jeroen, thanks for sharing the solution. 
James Walter
James Walter Jan 2
We have 20-plus years of combined experience in the trucking and repair industry, so you can trust us to get the job done right. Nashua Mobile Truck Repair