Thursday, January 18, 2007

We are in the midst of doing a total rewrite of our Software, and one of the things that has come up is date and time.  How do we do it, how do we store it, and how do we ensure that we can compare DateTime from one timezone to DateTime in another timezone.  After a lot of research, we settled on using UTC (or UCT depending on your preference).  FxCop will take care of ensuring we use UTC (for the most part).

That solves the problem, or so we thought.  Turns out, when you create a DateTime object either through the constructor, or through DateTime.Parse, its Kind defaults to DateTimeKind.Unspecified.  We need a way to ensure that all DateTime objects are always set to UTC.

What are our options?

Because we are using NHibernate, we have a few options.  The three NHibernate specific ones that immediately come to mind are using an Interceptor, a custom UserType with a SQL datetime column, and a custom UserType with a SQL varchar column; and the non-NHibernate specific one is creating our own DateTime container.  What are the pros and cons of each of these?

NHibernate Interceptor

Pro: very cross-cutting, can touch every object as it comes in and goes out to the database; if there are other data types we need to monkey with, we already have a framework in place.

Con: Very cross-cutting, can be expensive because it's touching every property on every entity as the entities are loaded and persisted

UserType with SQL datetime column

Pro: Only touching the DateTime objects that we want it to

Con: The type has to be specified for every DateTime object in every mapping file; no meta-data along with the date to stamp in the timezone it was created in

UserType with SQL varchar column

Pro: Only touching the DateTime objects that we want it to; can store the timezone and offset along with the date in the db

Con: Same as above UserType; abusing SQL data types; datetimes created at the same (relative) time in two different timezones won't be sorted correctly

Custom DateTime container

Pro: We can do anything we want

Con: Yuck! - I could write a whole paragraph on why this is yucky, but I'll leave that to your imagination

 

After some thought, I decided on the Interceptor!  Here is the class I came up with (you can also download the complete UtcDateTimeInterceptor class):

1 class UtcDateTimeInterceptor : IInterceptor 2 { 3 public bool OnLoad(object entity, object id, object[] state, string[] propertyNames, IType[] types) 4 { 5 ConvertDatabaseDateTimeToUtc(state, types); 6 return true; 7 } 8 9 public bool OnSave(object entity, object id, object[] state, string[] propertyNames, IType[] types) 10 { 11 ConvertLocalDateToUtc(state, types); 12 return true; 13 } 14 15 public bool OnFlushDirty(object entity, object id, object[] currentState, object[] previousState, string[] propertyNames, 16 IType[] types) 17 { 18 ConvertLocalDateToUtc(currentState, types); 19 return true; 20 } 21 22 private void ConvertLocalDateToUtc(object[] state, IType[] types) 23 { 24 int index = 0; 25 foreach (IType type in types) 26 { 27 if ((type.ReturnedClass == typeof(DateTime)) && state[index] != null && (((DateTime)state[index]).Kind == DateTimeKind.Utc)) 28 { 29 state[index] = ((DateTime)state[index]).ToUniversalTime(); 30 } 31 32 ++index; 33 } 34 } 35 36 private void ConvertDatabaseDateTimeToUtc(object[] state, IType[] types) 37 { 38 int index = 0; 39 foreach (IType type in types) 40 { 41 if ((type.ReturnedClass == typeof(DateTime)) && state[index] != null && (((DateTime)state[index]).Kind == DateTimeKind.Unspecified)) 42 { 43 //Create a new date and assume the value stored in the database is Utc 44 DateTime cur = (DateTime)state[index]; 45 DateTime result = DateTime.SpecifyKind(cur, DateTimeKind.Local); 46 state[index] = result; 47 } 48 49 ++index; 50 } 51 } 52 }

Loading The Entities

For the sake of brevity, I'm going to exclude the bits of the Interceptor interface that aren't relevant to my posting.  With that said, the OnLoad event (line 3) gets fired every time an entity is loaded from the database.  We can count on the fact that all dates are stored as UTC in the database because of stuff we'll do later, so we need to convert the DateTime that NHibernate generates (which has a DateTimeKind of Unspecified) to a UTC date (line 36 - 48).  The types array holds the CLR data type of each property in the entity, and each type in the array contains both the internal NHibernate type, and the CLR type. But we don't really care about how NHibernate maps the data types internally, so we are only interested in type.ReturnedClass.

The first thing we need to do is see if the ReturnedClass is of type DateTime (line 41), if its a DateTime, then we need to see if its null, and finally double check that the Kind on the DateTime object coming back from the database is Unspecified.  This last check is a sanity check, in case this behavior changes in the future.

After all these checks are passed, we need to create a new DateTime object from the old one, and set its Kind to Utc (lines 44 and 45).  Thankfully, DateTime has the built-in method SpecifyKind which will take care of building a DateTime of the specified kind for us. And finally replace the existing DateTime object with our new one (line 46).  Shampoo, rinse, repeat for all the DateTime values in the entity.

Persisting The Entities

Now we can move on to the save and update NHibernate events (line 9, and 15 respectively).  In these, we want to make sure the values being persisted to the datastore are UTC, and that no Local times have slipped through the cracks.  If one were so inclined, they could throw an error instead of converting the DateTime to UTC...

The basic code for converting Local DateTime's to Utc (line 22- 34) is much the same as above, but with a few exceptions.  When we do all our checks (line 27), this time we make sure the DateTimeKind is Local before we perform a conversion operation on it.  It is pointless to check if the Kind is Unspecified, because there is no conversion operation we can really perform on it.  On line 29, we can use the built in DateTime method ToUniversalTime() to convert a LocalTime to UTC.

Finishing Up

How do we wire this all up?  When you open a session on your session factory, you can pass in an Interceptor, this is where you would pass in the UtcDateTimeInterceptor.  eg:

ISession openSession = ourSessionFactory.OpenSession(new UtcDateTimeInterceptor());

I want to give credit where credit is due, I got the actual idea of using an Interceptor from  where he grappled with DateTime, null, messages and web services.  If anyone using NHibernate doesn't read , I would highly encourage you to.  He is a very, very sharp fellow; and prolific blogger.

posted on Thursday, January 18, 2007 3:36:52 PM (Alaskan Standard Time, UTC-09:00)  #    Comments [0]
Related posts:
LINQ Goodness
De-crapify your code base with AOP using PostSharp
Creating Windows Firewall Exceptions
Problems serializing class which inherits from a generic list
ASP.NET Resource Refactoring
Using Custom Attributes to Enable Quick Searching of Your Domain Entities With NHibernate

Referred by:
http://www.dotnetkicks.com/csharp/NHibernate_DateTime_and_UT... [Referral]
http://www.dotnetkicks.com/upcoming [Referral]
http://www.google.com/reader/view/ [Referral]
http://dotnetkicks.com/upcoming [Referral]
http://www.dotnetkicks.com/ [Referral]
http://www.dotnetkicks.com/tags/C%23 [Referral]
http://dotnetkicks.com/ [Referral]
http://www.dotnetkicks.com/tags/NHibernate [Referral]
http://technorati.com/search/www.ayende.com/Blog [Referral]
http://www.technorati.com/tag/nhibernate [Referral]
nhibernate (blogsearch.google.com) [Referral]
http://technorati.com/tag/nhibernate [Referral]
http://www.dotnetkicks.com/page/2 [Referral]
http://www.dotnetkicks.com/csharp [Referral]
nhibernate datetime null (www.google.com) [Referral]
http://del.icio.us/rstuven?url=http%3A%2F%2Fwww.milkcarton.c... [Referral]
http://www.dotnetkicks.com/tags/ORM [Referral]
date conversion nhibernate (www.google.fr) [Referral]
nhibernate null datetime (www.google.com) [Referral]
nhibernate datetime problem (www.google.com) [Referral]
http://technorati.com/search/www.ayende.com/Blog/?language=e... [Referral]
http://dotnetkicks.com/csharp [Referral]
nhibernate datetime problem / (www.google.pl) [Referral]
c# datetime utc webservice 2 (www.google.com) [Referral]
nhibernate converting datetime do data (www.google.com) [Referral]
NHibernate (www.google.com) [Referral]
how to compare dates in nhibernate (www.google.co.in) [Referral]
nhibernate data types (www.google.ca) [Referral]
datetime kind (www.google.com) [Referral]
nhibernate (blogsearch.google.com) [Referral]
NHibernate IType (www.google.nl) [Referral]
http://www.dotnetkicks.com/users/w3stfa11 [Referral]
nhibernate null objects (www.google.com) [Referral]
nhibernate datetime (www.google.com.br) [Referral]
iinterceptor onsave not fired (www.google.com) [Referral]
nhibernate data types (www.google.ca) [Referral]
nhibernate sql datetime (www.google.com) [Referral]
DateTime nhibernate (www.google.com) [Referral]
http://www.dotnetkicks.com/tags/NHIbernate [Referral]
nhibernate null datetime (www.google.com) [Referral]
NHibernate datetime null value (www.google.de) [Referral]
datetime UTC (www.google.cz) [Referral]
database datetime local (www.google.com) [Referral]
nHibernate null date time (www.google.com) [Referral]
DateTime Kind Sql (www.google.com) [Referral]
creating a DateTime object using UTC from time(0) (www.google.com.au) [Referral]
NHibernate & comparing only data part from datetime (www.google.pl) [Referral]
Nhibernate datetime (www.google.co.uk) [Referral]
nhibernate date comparison (www.google.co.uk) [Referral]
nhibernate utc (www.google.com) [Referral]
DateTime to UTC (www.google.com) [Referral]
how to compare datetime columns +sql (www.google.com) [Referral]
nhibernate datetime null (www.google.at) [Referral]
NHibernate itype (www.google.com) [Referral]
web services datetime standard utc (www.google.com) [Referral]
nhibernate "null objects" (www.google.com.au) [Referral]
create a datetime object (search.yahoo.com) [Referral]
Nhibernate date (www.google.com) [Referral]
NHibernate + DateTime + null value (www.google.be) [Referral]
nhibernate interceptor (www.google.it) [Referral]
nhibernate date type (www.google.co.uk) [Referral]
nhibernate data type (www.google.es) [Referral]
nhibernate (www.google.com.au) [Referral]
c# comparing date part only of a datetime (www.google.com) [Referral]
nhibernate datetime null (www.google.be) [Referral]
nHibernate type date Time (www.google.com.br) [Referral]
castle activerecord store dates utc (www.google.co.nz) [Referral]
nhibernate dates (www.google.com) [Referral]
nhibernate data types (www.google.ca) [Referral]
http://www.dotnetkicks.com/tags/DateTime [Referral]
nhibernate data types (www.google.be) [Referral]
nhibernate datetime problem (www.google.co.uk) [Referral]
nhibernate date utc (www.google.com) [Referral]
nhibernate date null (www.google.se) [Referral]
datetime c# nhibernate (www.google.com) [Referral]
nhibernate datatypes (www.google.de) [Referral]
NHibernate onsave event (www.google.co.za) [Referral]
nhibernate null datetime (www.google.co.uk) [Referral]
nhibernate datetime (www.google.de) [Referral]
NHibernate date types sql (www.google.com) [Referral]
nhibernate TypeFactory (www.google.com) [Referral]
datetime to utc sql (www.google.com) [Referral]
nhibernate null datetime interceptor (www.google.com) [Referral]
nhibernate convert (www.google.it) [Referral]
datetime UTC (www.google.com) [Referral]
nhibernate web services (search.live.com) [Referral]
hibernate UTC dates (search.yahoo.com) [Referral]
nhibernate onsave (www.google.com) [Referral]
nhibernate types datetime (www.google.com) [Referral]
Interceptors nhibernate (www.google.com) [Referral]
convert date to utc "SQL" (www.google.es) [Referral]
nhibernate convert values (www.google.com) [Referral]
c# nhibernate datetime (www.google.at) [Referral]
null datetime nhibernate (www.google.co.uk) [Referral]
nhibernate date mapping types null (www.google.cl) [Referral]
iinterceptor nhibernate (www.google.ca) [Referral]
nhibernate datetime (www.google.com.br) [Referral]
sql date time format local utc (www.google.com.au) [Referral]
c# compare DateTime column with DateTime object in sql string (www.google.ge) [Referral]
sql date line conversion (www.google.com) [Referral]
c# datetime set timezone (www.google.com) [Referral]
null date nhibernate (www.google.com) [Referral]
nhibernate date null (www.google.com) [Referral]
NHibernate data types (www.google.bg) [Referral]
datetime object and webservices (www.google.co.il) [Referral]
format date in NHibernate ASP .Net (www.google.com) [Referral]
nhibernate datetime (www.google.com) [Referral]
NHibernate DateTime Date only (www.google.ru) [Referral]
C# DATETIME SET A DATETIME VALUE (www.google.ca) [Referral]
interceptor nHibernate (www.google.de) [Referral]
store UTC datetime format in sql database (www.google.co.in) [Referral]
DateTime from UTC string (www.google.ru) [Referral]
data types nhibernate (www.google.com) [Referral]
nhibernate "web services" (www.google.it) [Referral]
null datetime nhibernate (www.google.ca) [Referral]
convert a datetime value to utc c# (www.google.ca) [Referral]
NHibernate Cons (www.google.co.in) [Referral]
nhibernate convert (www.google.com) [Referral]
C# DateTimeKind Date (www.google.dk) [Referral]
DateTime utc (www.google.com) [Referral]
nhibernate date only (www.google.no) [Referral]
nhibernate interceptors (www.google.nl) [Referral]
object datetime problem (www.google.fr) [Referral]
nhibernate (www.google.co.uk) [Referral]
convertendo data para base UTC webservices (www.google.com.br) [Referral]
converting datetime to utc (www.google.co.uk) [Referral]
NHibernate data types (www.google.com) [Referral]
nhibernate date (www.google.cz) [Referral]
create date datetime nhibernate (www.google.com) [Referral]
interceptor nhibernate (www.google.co.in) [Referral]
data types in Nhibernate (www.google.co.in) [Referral]
nhibernate read datetime problem (www.google.com) [Referral]
nhibernate using datetime (www.google.com) [Referral]
nhibernate datestamp (www.google.com) [Referral]
datetime nhibernate (www.google.fr) [Referral]
nhibernate sql datetime null (www.google.be) [Referral]
nhibernate interceptor (www.google.com.au) [Referral]
C# DateTime format strings UTC (www.google.co.uk) [Referral]
how to compare only dates when datetime is s tored in the database in c# (www.google.co.in) [Referral]
hibernate store datetime utc (www.google.com) [Referral]
datetime format in activerecord in c# (www.google.com) [Referral]
interceptor nhibernate (www.google.com) [Referral]
hibernate utc datetime (www.google.com) [Referral]
nhibernate date string (www.google.com) [Referral]
NHibernate Interceptor (www.google.ch) [Referral]
DateTime Null C#+NHibernate (www.google.co.id) [Referral]
nhibernate datetime mapping (www.google.com) [Referral]
c# set datetime as utc (www.google.com) [Referral]
nhibernate date without time (www.google.com.ar) [Referral]
c# add timezoe utc (www.google.com) [Referral]
nhibernate data type (www.google.co.in) [Referral]
c# convert utc datetime to local (www.google.gr) [Referral]
nhibernate interceptor previousState null (www.google.co.uk) [Referral]
NHibernate date comparison (www.google.co.za) [Referral]
nhibernate problems with DateTime (www.google.com) [Referral]
convert date to UTC dates in c# (www.google.com) [Referral]
nhibernate datetime object (www.google.com) [Referral]
NHIbernate Pros Cons (www.google.com) [Referral]
CSharp DateTime set UTC (www.google.com) [Referral]
c# convert datetime to UTC (www.google.com) [Referral]
DateTimeKind.Utc (search.yahoo.com) [Referral]
NHibernate mapping datetime type (www.google.com.vn) [Referral]
sql "convert date to utc" (www.google.co.uk) [Referral]
datetime utc (www.google.com) [Referral]
nhibernate data types (www.google.com) [Referral]
UTC +webservices (www.google.com.br) [Referral]
nhibernate null date (www.google.co.cr) [Referral]
ISession C# NHIBERNATE (www.google.com) [Referral]
nhibernate compare year (www.google.co.uk) [Referral]
hibernate utc time problem (www.google.pl) [Referral]
nhibernate interceptor (www.google.de) [Referral]
nhibernate mapping date (www.google.com) [Referral]
Converting from local timezone to UTC in C# (www.google.co.in) [Referral]
NHibernate events (www.google.com) [Referral]
nhibernate datetime (www.google.be) [Referral]
Date Format NHibernate (www.google.com) [Referral]
NHibernate only date value (www.google.com.br) [Referral]
c# + store datetime from database in string (www.google.co.in) [Referral]
DateTime.Utc (www.google.co.uk) [Referral]
nhibernate datetime utc (www.google.se) [Referral]
nHibernate Convert (www.google.com) [Referral]
nhibernate datetime to varchar (www.google.com) [Referral]
utc webservice (www.google.hu) [Referral]
convert utc time to datetime csharp (www.google.com.vn) [Referral]
utc kind LINQ datetime (www.google.com) [Referral]
convert UTC time to datetime C# (www.google.com.vn) [Referral]
comparing datetime to null + sql (www.google.com) [Referral]
sql + convert date to UTC format (www.google.com) [Referral]
convert datetime to utc (www.google.com) [Referral]
nhibernate null datetime (www.google.com) [Referral]
NHibernate Interceptor update (www.google.com) [Referral]
c# convert datetime to "UTC String" (www.google.com) [Referral]
nhibernate datetime (www.google.com.uy) [Referral]
nhibernate type (www.google.com) [Referral]
interceptor nhibernate (www.google.be) [Referral]
custom milk carton containers (www.google.com) [Referral]
nhibernate data types (www.google.com.mt) [Referral]
Convert Date Time to UTC+C# (www.google.com.eg) [Referral]
c# convert utc date to datetime (www.google.com.by) [Referral]
nhibernate version datetime problem (www.google.lt) [Referral]
nhibernate datetime convert to database (www.google.lt) [Referral]
NHibernate DateTime problem (www.google.pl) [Referral]
convert datetime to datetimekind.utc (www.google.com) [Referral]
activerecord "c#" date (www.google.com) [Referral]
nhibernate events IInterceptor (www.google.co.uk) [Referral]
nhibernate double datetime (www.google.com) [Referral]
persistentCollection + interceptor +nhibernate (www.google.com.ar) [Referral]
c# comparing timezones (www.google.com) [Referral]
convert DateTime From UTC DateTimeKind.Local (www.google.com.ua) [Referral]
converting Datetime column in nhibernate (www.google.co.in) [Referral]
convert UTC format date to datetime in C# (www.google.com) [Referral]
SQL comparing date only with DateTime objects (www.google.com) [Referral]
nhibernate interceptor onflushdirty (www.google.com) [Referral]
c# datetime locale conversion (www.google.co.uk) [Referral]
hibernate utc date (www.google.com) [Referral]
sql datetime kind (www.google.com) [Referral]
NHibernate Events (www.google.com) [Referral]
hibernate comparar somente data datetime (www.google.com.br) [Referral]
converting utc to C# datetime (www.google.com) [Referral]
convert to datetime utc format (www.google.com.sg) [Referral]
convert sql date to c# datetime object (www.google.com) [Referral]
nhibernate date (www.google.ch) [Referral]
sql datetime unspecified local (www.google.co.uk) [Referral]
Interceptor NHibernate (www.google.co.uk) [Referral]
null dates nhibernate (www.google.com.ar) [Referral]
c# datetime utc (search.yahoo.com) [Referral]
nhibernate interceptor onsave (www.google.com) [Referral]
NHibernate datetime (www.google.com) [Referral]
NHibernate UTC datetime (www.google.com) [Referral]
NHibernate interceptor (www.google.com) [Referral]
C# DateTime DateTimeKind web services (www.google.com) [Referral]
convert utc to datetime c# (www.google.com.au) [Referral]
set timezone c# date time (www.google.com.au) [Referral]
asp.net+save+datetime +null value+on sql data base+C# (www.google.lk) [Referral]
nhibernate date store format (www.google.com) [Referral]
hibernate datetime problem (www.google.com) [Referral]
nhibernate format (www.google.de) [Referral]
Castle ActiveRecord DateTime format (www.google.ro) [Referral]
comparing datetime objects in SQL ? (www.google.com) [Referral]
NHibernate Date type (www.google.ca) [Referral]
DateTime setting utc (www.google.com.au) [Referral]
datetime convert from utc string (www.google.com) [Referral]
date time UTC? (www.google.com) [Referral]
C# database datetime utc to local (www.google.com) [Referral]
hibernate store utc time (www.google.de) [Referral]
nhibernate datetime problem -nullable (www.google.com) [Referral]
datetime to UTC (www.google.com) [Referral]
csharp+convert+dateTime+UTC (www.google.com) [Referral]
sql datetime to utc datetime (www.google.com.au) [Referral]
NHibernate Interceptor (www.google.com) [Referral]
nhibernate datetime format (www.google.ca) [Referral]
http://swik.net/utc [Referral]
utc c# (www.google.de) [Referral]
nhibernate convert date sql (www.google.it) [Referral]
c# datetime Unspecified (www.google.com.ua) [Referral]
Converting DateTime to UK time zone C# (www.google.co.in) [Referral]
nhibernate datetime format (www.google.ca) [Referral]
.net web service setting datetime (www.google.com) [Referral]
nhibernate create date column (www.google.com) [Referral]
nhibernate date compare (www.google.com) [Referral]
nhibernate update datetime (www.google.com.vn) [Referral]
nhibernate problem date mapping (www.google.de) [Referral]
Convert date to UTC (www.google.com) [Referral]
NHibernate IInterceptor (www.google.fr) [Referral]
nhibernate interceptor (www.google.be) [Referral]
C# converting to UTC datetime (www.google.com) [Referral]
datetime UTC (www.google.com) [Referral]
NHibernate UTC to local time conversions (www.google.com) [Referral]
nhibernate datetime (www.google.com) [Referral]
nhibernate convert (www.google.com.my) [Referral]
Ge in Nhibernate (www.google.com.vn) [Referral]
nhibernate date format error (www.google.ru) [Referral]
nhibernate date (www.google.co.in) [Referral]
setTimeZone C# (www.google.at) [Referral]
NHibernate data types (www.google.com) [Referral]
"C#" "Utc to" "Datetime" (www.google.co.uk) [Referral]
convert date to UTC c (www.google.co.uk) [Referral]
convert utc datetime to local linq (www.google.com) [Referral]
NHibernate + DateTime format (www.google.com) [Referral]
datetime from utc (www.google.ru) [Referral]
nhibernate date (www.google.fr) [Referral]
c# utc datetime (search.yahoo.com) [Referral]
activerecord datetime (www.google.com) [Referral]
C# set timezone (tw.search.yahoo.com) [Referral]
C# date string to Datetime conversion (www.google.com) [Referral]
nhibernate formatter date (www.google.fr) [Referral]
null datetime nhibernate (www.google.com) [Referral]
linq datetime format (www.google.com) [Referral]
csharp dateTime convert GMT time (www.google.ca) [Referral]
interceptor nhibernate (www.google.co.za) [Referral]
c# DateTimeKind (www.google.cz) [Referral]
Persist data as UTC Hibernate (www.google.com) [Referral]
nhibernate date (www.google.com) [Referral]
UTC C# (www.google.com) [Referral]
nhibernate convert types (www.google.com) [Referral]
hibernate datetime (www.google.com.tw) [Referral]
DateTime UTC (www.google.co.jp) [Referral]
nhibernate data types (www.google.co.uk) [Referral]
activerecord comparing datetime (www.google.pl) [Referral]
c# sql date to uk datetime (www.google.co.uk) [Referral]
create UTC DateTime in c# (www.google.com) [Referral]
datetime in utc (www.google.com) [Referral]
DateTime From UTC (www.google.com) [Referral]
hibernate utc time (www.google.de) [Referral]
convertir datetime a date en nhibernate (www.google.com.ar) [Referral]
http://www.milkcarton.com/ [Referral]
nhibernate datetime null problem (www.google.fr) [Referral]
hibernate mapping UTC (www.google.com) [Referral]
nhibernate datatypes (www.google.ca) [Referral]
nhibernate data type (www.google.com.pe) [Referral]
utc webservice (www.google.it) [Referral]
http://jira.nhibernate.org/browse/NH-1135 [Referral]
IInterceptor NHibernate (www.google.fr) [Referral]
nhibernate event (www.google.fr) [Referral]
datetime (search.live.com) [Referral]
nhibernate sql date functions (www.google.com) [Referral]
nhibernate display date only (www.google.com.sg) [Referral]
type time+nhibernate+aspx (www.google.de) [Referral]
nhibernate passing null datetime values (www.google.co.uk) [Referral]
nhibernate datetime type (www.google.ru) [Referral]
NHibernate compare datetime (www.google.pt) [Referral]
nhibernate datetime null (www.google.com.br) [Referral]
nhibernate IType datetime (www.google.de) [Referral]
datetime hibernate format (www.google.com) [Referral]
convert datetime to zulu C# (www.google.com) [Referral]
nhibernate datetime? property nullable (www.google.co.cr) [Referral]
nhibernate, null date (www.google.com) [Referral]
nhibernate interceptor state (www.google.com) [Referral]
datetime null value in nhibernate\ (www.google.com.vn) [Referral]
nhibernate events (www.google.de) [Referral]
nhibernate event (www.google.de) [Referral]
c# parse datetime as utc (www.google.co.uk) [Referral]
nhibernate interceptor events (www.google.it) [Referral]
nhibernate interceptor (www.google.com) [Referral]
DateTime Kind Locale (www.google.co.jp) [Referral]
UTC time zone support hibernate (www.google.co.in) [Referral]
nhibernate datetime functions (www.google.com) [Referral]
nhibernate short date (www.google.com.sg) [Referral]
interceptor nhibernate sql (www.google.com) [Referral]
c# convert from utc (www.google.ca) [Referral]
create datetime with kind utc c# (www.google.ca) [Referral]
nhibernate data type (www.google.com) [Referral]
save data in UTC time zone format hibernate (www.google.co.in) [Referral]
google datastore comparing datetime property (www.google.co.jp) [Referral]
DateTime +UTC (www.google.lt) [Referral]
how to use datepart function in hibernate (www.google.co.in) [Referral]
nhibernate utc dates (www.google.co.uk) [Referral]
nhibernate date not datetime (www.google.com) [Referral]
nhibernate datepart (www.google.com) [Referral]
LINQ datetime differs from SQL DateTime (www.google.es) [Referral]
c# convert utc (www.google.com) [Referral]
NHibernate Null for DateTime field (www.google.com) [Referral]
C# DateTime? NHibernate (www.google.com) [Referral]
datetime utc (www.google.fr) [Referral]
nhibernate datetime type property (www.google.se) [Referral]
nhibernate datetime null (www.google.at) [Referral]
C# datetime set from utc (www.google.com) [Referral]
nhibernate data types (www.google.nl) [Referral]
nhibernate date (www.google.com) [Referral]
NHibernate datetime functions (www.google.com.br) [Referral]
store date database UTC (www.google.com) [Referral]
.net datetime to zulu (www.google.com) [Referral]
datetime formats in SQL UTC (www.google.com) [Referral]
null date nhibernate (www.google.com.br) [Referral]
c# convert utc to local time (www.google.com) [Referral]
Nhibernate formula date (www.google.se) [Referral]
hibernate date time conversion (www.google.com) [Referral]
c# datetime zulu with offset (www.google.com) [Referral]
sql datetime locale (www.google.com) [Referral]
NHibernate DateTime Type (www.google.com) [Referral]
IInterceptor nhibernate (www.google.com) [Referral]
convert utc date to string in c# (www.google.com.sg) [Referral]
can we set datetime=NULL (www.google.co.in) [Referral]
DateTime unspecified (www.google.com) [Referral]
nhibernate datetime property (www.google.nl) [Referral]
nhibernate datetime property format (www.google.nl) [Referral]
pros and cons of nhybernate (www.google.si) [Referral]
utc nhibernate (www.google.de) [Referral]
nhibernate data type (www.google.dk) [Referral]
nhibernate Datumsfeld null (www.google.de) [Referral]
parse datetime to utc (www.google.es) [Referral]
c# convert date locale (www.google.co.uk) [Referral]
c# DateTime locale (www.google.ru) [Referral]
nhibernate IInterceptor change properties (www.google.de) [Referral]
DateTime ASP.Net C# DateTimeKind (www.google.com) [Referral]
Converting DateTime from UTC to localtime (www.google.com) [Referral]
nhibernate criteria date time (www.google.com) [Referral]
nhibernate datetime format (www.google.com.ar) [Referral]
database sql dateTime C# UTC (www.google.com) [Referral]
convertir de IType [ ] a NHibernate type (www.google.com.mx) [Referral]
how to convert datetime datatype in US format to UK format in C# (www.google.co.in) [Referral]
How to feed Null Datetime in the SqlDatabase using Asp.Net (www.google.co.in) [Referral]
hibernate utc (www.google.be) [Referral]
datetime (search.live.com) [Referral]
nhibernate sql datatime null (www.google.ie) [Referral]
hibernate compare datetime with date (www.google.com) [Referral]
nhibernate date functions (www.google.com) [Referral]
Convert NHibernate XmlSerializer (www.google.com) [Referral]
nhibernate comparing dates (www.google.com) [Referral]
sql datetime time zone nhibernate (www.google.com) [Referral]
nhibernate intercepter (www.google.com.sg) [Referral]
convert datetime in sql to string UK (www.google.co.uk) [Referral]
convert UK datetime into US Datetime in C# (www.google.co.in) [Referral]
convert a datetime to UTC in .net (www.google.co.in) [Referral]
nhibernate iinterceptor Onload (www.google.com) [Referral]
"Convert Date TO UTC + 02:00 csharp" (www.google.com.tr) [Referral]
nhibernate + two database con + c# (www.google.at) [Referral]
LINQ "DateTime" (www.google.com) [Referral]
ASP convert date GMT (www.google.com) [Referral]
datetime property nhibernate (www.google.cz) [Referral]
datetime in utc (www.google.ca) [Referral]
datetime type UTC (www.google.com) [Referral]
persisting UTC time with nHibernate (www.google.com) [Referral]
DateTime from UTC value (www.google.com) [Referral]
c# datetime tolocal (www.google.co.nz) [Referral]
NHIbernate - Pros and cons (www.google.co.in) [Referral]
nhibernate datetime properties (www.google.com) [Referral]
datetime c# to utc time string (www.google.nl) [Referral]
utc datetime c# (www.google.com) [Referral]
c# format as UTC (www.google.co.uk) [Referral]
nhibernate comparing dates (www.google.pl) [Referral]
Hibernate mapping of SQL datetime (www.google.com) [Referral]
linq locale problem with datetime (www.google.com) [Referral]
hibernate date utc (www.google.com) [Referral]
c# datetime from UTC (www.google.cz) [Referral]
LINQ DateTime UTC (www.google.com) [Referral]
DateTime to use Utc Dates (www.google.com) [Referral]