Help with timestamp
Posted: Sat Aug 16, 2008 10:39 am
Hello everyone,
I'm pulling my hair over how to change the way the date is displayed before the title of the post. I'm using the Andreas08 theme and I dug my way into lang_eng.inc.php where I found this line:Looking at php.net I'm thinking it's not using standard php date(), because I can't for the life of me find b there (I'm guessing smarty has it's own dates defined with the %x, am i right? I tried changing %b to %a, %c etc and got various results).
I found that %m %e displays the day and month the way I want it, but I'd like it without the leading zeros. Is there a way for this?
And here comes the tricky part: I want to add japanese characters after the day and month (so to have it displayed as such: 08月 16日 (i hope the chars will show up).
Now, I tried adding it with notepad++, where the chars would display only as ? (guessing I have a setting wrong there). I instead tried with regular Notepad, and when I hit save, it prompted me to save as unicode (as I had the chars in there). Sure enough, I tried it, but when I uploaded the file and tested, instead of the date it spat out DATE_FORMAT_ENTRY_ANDREAS.
I'm stumped.
Is it possible to do what I'm after? Any help is appreciated. 
Edit: Again, I should really try all options before posting. I feel really stupid now.. *hides under carpet*
What I did was simply this: Notepadd++, in the meny format, select 'encode in UTF-8' and the chars would show. Saving and uploading, it displays how I want to.
Never mind me.

I'm pulling my hair over how to change the way the date is displayed before the title of the post. I'm using the Andreas08 theme and I dug my way into lang_eng.inc.php where I found this line:
Code: Select all
@define('DATE_FORMAT_ENTRY_ANDREAS', '%b %e:');I found that %m %e displays the day and month the way I want it, but I'd like it without the leading zeros. Is there a way for this?
And here comes the tricky part: I want to add japanese characters after the day and month (so to have it displayed as such: 08月 16日 (i hope the chars will show up).
Now, I tried adding it with notepad++, where the chars would display only as ? (guessing I have a setting wrong there). I instead tried with regular Notepad, and when I hit save, it prompted me to save as unicode (as I had the chars in there). Sure enough, I tried it, but when I uploaded the file and tested, instead of the date it spat out DATE_FORMAT_ENTRY_ANDREAS.
I'm stumped.
Edit: Again, I should really try all options before posting. I feel really stupid now.. *hides under carpet*
What I did was simply this: Notepadd++, in the meny format, select 'encode in UTF-8' and the chars would show. Saving and uploading, it displays how I want to.
Never mind me.