icon Get the most out of Surmunity, read our tips here! Need an interesting blog to read? You've got to read the Surpass Blog! | Welcome! Please register to access all of our features.
Old October 7th, 2008, 2:12 AM   #1 (permalink)
Registered User
Fresh Surpasser
 
Joined in Oct 2008
2 posts
Gave thanks: 0
Thanked 0 times
Nucleus date format question

(Not sure if this is the right forum, so if it isn't, mod, please move at your leisure.)

Hey all - I've been with surpass for a couple of weeks now, and I've done a good job of keeping up with my blog, thankyouverymuch.

The one thing that bothers me about it, though, is that I can't seem to figure out where the setting for the date format is in the php files on my account. I'm American, so I'd rather see October 2 represented as 10.2 on the blog and not 2.10. I've tried to look up information online on how to change it, but I can't seem to find the stuff they're referring to - so with that, I turn to you, the Surmunity. Anyone familiar with how to go about changing this?

TIA...

-CB


Dented Cap Brewing
belsonc is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Old October 7th, 2008, 3:51 AM   #2 (permalink)
Surpass Fan
Comfy Contributor
 
Rick's Avatar
 
Joined in Sep 2004
Hosted on Pass42
278 posts
Gave thanks: 4
Thanked 50 times
Login to the admin section of your nucleus install.

First we need to edit the Template's index file...
On the menu on the left, click "Templates".
You should now see a list of files, find "default/index" and click the "edit" action.
Now scroll down and look for the "Date and Time" section.
Under this section is a field "Date Format" which probably contains "%d/%m", change this to "%m/%d".
Then scroll to the bottom and click "Update Template".

Now we need to edit the Template's item file...
On the menu on the left, click "Templates".
You should now see a list of files, find "default/item" and click the "edit" action.
Now scroll down and look for the "Date and Time" section.
Under this section is a field "Date Format" which probably contains "%d/%m", change this to "%m/%d".
Then scroll to the bottom and click "Update Template".

If you want to get fancy, you can use the following to customize your date and time formats:
  • %a - abbreviated weekday name according to the current locale
  • %A - full weekday name according to the current locale
  • %b - abbreviated month name according to the current locale
  • %B - full month name according to the current locale
  • %c - preferred date and time representation for the current locale
  • %d - day of the month as a decimal number (range 00 to 31)
  • %H - hour as a decimal number using a 24-hour clock (range 00 to 23)
  • %I - hour as a decimal number using a 12-hour clock (range 01 to 12)
  • %j - day of the year as a decimal number (range 001 to 366)
  • %m - month as a decimal number (range 1 to 12)
  • %M - minute as a decimal number
  • %p - either `am' or `pm' according to the given time value, or the corresponding strings for the current locale
  • %S - second as a decimal number
  • %U - week number of the current year as a decimal number, starting with the first Sunday as the first day of the first week
  • %W - week number of the current year as a decimal number, starting with the first Monday as the first day of the first week
  • %w - day of the week as a decimal, Sunday being 0
  • %x - preferred date representation for the current locale without the time
  • %X - preferred time representation for the current locale without the date
  • %y - year as a decimal number without a century (range 00 to 99)
  • %Y - year as a decimal number including the century
  • %Z - time zone or name or abbreviation
  • %% - a literal `%' character
__________________
Rick is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Old October 7th, 2008, 10:25 AM   #3 (permalink)
Registered User
Fresh Surpasser
 
Joined in Oct 2008
2 posts
Gave thanks: 0
Thanked 0 times
Rick, would you believe that my friend and I couldn't find that because we were both looking in the file manager of cPanel, not in Nucleus in and of itself?

"Dammit, why can't I find what they're talking about in any of these PHP files?"




Much obliged, sir - I'll definitely be bookmarking this thread.

-CB
belsonc is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Old October 8th, 2008, 3:30 AM   #4 (permalink)
Surpass Fan
Excelling Contributor
 
fury's Avatar
 
Joined in Dec 2005
Lives in MN > USA
Hosted on pass84
934 posts
Gave thanks: 45
Thanked 41 times
Somewhat unrelated, but I am using Wordpress and I had an issue with the date on my blog.

When I first started making posts, it only listed the DATE and TIME for the first post of each day. The way my theme (made it myself) formats the posts, it has the date and time on each post. I looked this up in the Codex for WP and I read that I just have to put the full date and time code (Unix format) into the time display format setting for Wordpress. Ok, so I did that and it showed the date and time as I wanted it to on each post on the blog index.

However, the date and time on comments are displayed like:

Tuesday October 7th, 2008 at Tuesday October 7th, 2008 at 10:29pm

Reason for this is because it is showing the date stamp, and the time stamp, and the time stamp is set to show the date and the time, to fix the issue on the index. So I searched around in the code (took a while) and I found a page that did the time stamp stuff on the comments. I was able to get rid of the DATE, so it shows the only the time stamp, which is the DATE and the TIME. However, it shows up like this:

at Tuesday October 7th, 2008 at 10:29pm

I cannot for the life of me find where the first "at" comes from. Anyone have any ideas?
__________________
fury™ - not helping the situation since 1987
robmonroe.net | | bullsux.com
fury is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Old October 8th, 2008, 5:22 AM   #5 (permalink)
Surpass Fan
Comfy Contributor
 
Rick's Avatar
 
Joined in Sep 2004
Hosted on Pass42
278 posts
Gave thanks: 4
Thanked 50 times
In the WordPress default theme there is a 'comment.php' file which contains the following code...

Code:
<small class="commentmetadata"><a href="#comment-<?php comment_ID() ?>" title=""><?php comment_date('F jS, Y') ?> at <?php comment_time() ?></a> <?php edit_comment_link('edit','&nbsp;&nbsp;',''); ?></small>
I suspect your customized theme is based on this or a similiar theme. Even though you may have suppressed the date format (but included it in the time format) in the admin, the theme itself is still displaying "at" between the two formats.
__________________
Rick is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
This user thanks Rick for this great post!
fury (October 11th, 2008)
Old October 11th, 2008, 2:24 AM   #6 (permalink)
Surpass Fan
Excelling Contributor
 
fury's Avatar
 
Joined in Dec 2005
Lives in MN > USA
Hosted on pass84
934 posts
Gave thanks: 45
Thanked 41 times
That fixed it! You're my new favorite helper on the forum
__________________
fury™ - not helping the situation since 1987
robmonroe.net | | bullsux.com
fury is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Reply


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On