Change The Date and time?

hi,this is khafanovich a new elgg lover.

I want to show date and time in jalali format.(used in persian and arabic language)

for example i want to change the date time format from 2010/08/08 to 1389/09/10

i have the routines and algorithm in php.take a  look @ this scenario

1.in every place where there is a date@time do this

   1.2. before rendering the page and showing the html use function B(Date@time) to calculate

         the jalali format and show the result date and time instead of regular one.

we dont want to change the database entrys.just in presentation of web pages we want to show our date and time format.

where and how can i do this

thx a lot.