New Global Date and Time Support
Posted in Website, BlogSvc, jQuery by JarrettV on 10/7/2008 10:01:55 PM - CST
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
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