Hi I am passing a value to my attribute StartDate = "7/20/2009 12:00" (i.e I am in IST Time zone) and when it is saved in the database it is automatically saved as "7/20/2009 01:30 PM". I assume when it reaches the database, the SQL Server is automatically converting the date time to the server datetime.
If I specifically send a date like this "7/10/2009 16:30:10" then it is exactly going as it is. This problem comes only if my date is having 12AM/PM or if I set value = System.DateTime.Now.
<?xml version="1.0" encoding="utf-8" ?> <hibernate-mapping xmlns="urn:nhibernate-mapping-2.2"> <class lazy="false" name="............................................................> <property name="IncidentStartDate" column="IncidentStartDate" /> <property name="IncidentEndDate" type="DateTime"> <column name="IncidentEndDate" sql-type="DateTime" not-null="false"/> </property> </class> </hibernate-mapping>
Any help on this would be greatly appreciated.
Thanks, Arun.K.S
|