New Global Date and Time Support

Posted in Website BlogSvc jQuery by Jarrett on 10/7/2008 10:01:55 PM - CST

image With .Net 3.5 there is great new support for working with dates across time zones.  Check out Dan Rigsby's blog for some great posts about the new classes.

Working with Dates and Times in .Net 3.5 Series:
Part 1: DateTime vs. DateTimeOffset in .Net
Part 2: TimeZone vs. TimeZoneInfo in .Net

BlogSvc directly benefits from these enhancements in two ways:

  • Configure all dates to show in preferred timezone
  • Show time relative to the user (via jQuery)

Two new configuration settings allow you to control which timezone your website uses.  The TimeZoneInfoId sets the timezone based on the timezones loaded on the server.  The TimeZoneDisplay sets a shorthand value that can be shown next to the times on your site.

BlogSvc utilizes the <abbr> to allow a concise view of the date.  By hovering over the date you can see an unambiguous view of the time.  BlogSvc also uses the jQuery Time Ago plugin to show relative times that make sense to viewers.

Comments

Comments Feed
Trackback from Jarrett's Tech Blog on 10/8/2008 9:24:20 PM - CST

Using the New DateTime Support in .NET 3.5 via MVC & jQuery

I’ve added New Global Date and Time Support to BlogSvc by utilizing the new expanded…
Posted by Amr Elsehemy on 10/11/2008 6:57:43 AM - CST
Amr Elsehemy
This project is really promising keep on it going. I love MVC and jQuery and this is one excellent project utilizing both technologies

Add Comment

Please enter your name.
will not be published, shows your gravatar Please enter a valid email.
Please enter a valid website.
Please supply a comment.
4.5 (2)
on 12/22/2008 1:56:32 PM - CST

Valid XHTML 1.0 Strict