Lately I’ve been trying to find a way to change the default display of the entry datetime in dasBlog.  The default looks like:

6/28/2005 12:05:20 AM (Eastern Daylight Time, UTC-05:00)

I wanted

Tuesday, June 28, 2005 12:05 AM EST

Omar pointed out that formatting macrosexist to perfom this task:

<%readerWhen%><%formattedWhen(string format, bool addTimezone)%><%formattedWhen(string format)%>

The format string works well, but if you have the code add the timezone, it outputsit as a long string (”Eastern Daylight Time”) The problem was that when I tried <%formattedWhen(…)%> andpassed False to addTimezone, the result was alwaysan empty string.  I tried “False”, False, “0″,and 0.  No luck.  After looking at the code,I can’t see why the formattedWhen function doesn’t work for me, but I did discoverthe <%FormattedWhenBare(string format)%> macro.

This one works well with my input of:

<%FormattedWhenBare(”dddd, MMMM d, yyyy h:mm tt”)%>&nbsp;EST.

So, if you’re looking to specify your own string format of the entry datetime withoutthe long timezone, use <%FormattedWhenBare(string format)%>.



June 28th, 2005  
Leave a comment
Name:


Email: (will not be published)


Website:


Comments:



 

My Photos
www.flickr.com
This is a Flickr badge showing photos in a set called Weblog photos. Make your own badge here.