Monthly Archives: May 2012

msysgit conflict with Subversion

I’ve got msysgit installed, with the bin directory in my PATH.

Unfortunately msysgit uses svn 1.4.6 still, so when I was running svn on the command line it was finding the older msysgit version first, not the newer version that’s part of TortoiseSVN.

There’s a WontFix bug on the msysgit tracker:

Shuffling the order of the PATHs has solved the problem for now.

“DateTimeOffset should be considered the default date and time type for application development”

If you’re in the habit (like I was until recently) of using the DateTime data type whenever you need to represent a date, time or timestamp then I strongly recommend reading this MSDN article:

Choosing Between DateTime, DateTimeOffset, and TimeZoneInfo

The main points are:

  • Only if a DateTime value represents UTC does that value unambiguously identify a single point in time regardless of the system or time zone in which the value is used.
  • The DateTimeOffset structure represents a date and time value, together with an offset that indicates how much that value differs from UTC. Thus, the value always unambiguously identifies a single point in time.
  • The DateTimeOffset type can be used to unambiguously define the meaning of “now”, to log transaction times, to log the times of system or application events, and to record file creation and modification times.
  • These uses for DateTimeOffset values are much more common than those for DateTime values. As a result, DateTimeOffset should be considered the default date and time type for application development.

It’s worth also mentioning that recent versions of SQL Server support an equivalent type, so you can easily persist this type in databases without any conversion: datetimeoffset