There is _no need_ to create a fix, because there is no problem.This is strictly a presentation issue in the UI (and the logs), that is all
On Tue, Jan 20, 2009 at 6:33 AM, Chris Smith <chris.j.smith.uk@ googlemail.com> wrote: > > Ok didn't realise that. I assume it formats the date using the system > locale on the client? > > I'll run it through SQL Profiler and see what is happening there, > failing that going back to straight ado to work out a fix. > > Really banging my head on the wall with this one. > > Cheers, > > Chris. > > 2009/1/20 Ayende Rahien <[email protected]>: > > That isn't what is actually going on. > > The type is being sent as a date time to the DB, not as a string. > > NH Prof just show it to you that way because this is the way that make > sense > > to us. > > > > On Tue, Jan 20, 2009 at 6:15 AM, Chris Smith > > <[email protected]> wrote: > >> > >> No it doesn't. The column is a DateTime and the object is a DateTime. > >> The mapping specifies no type. As it goes over the connection > >> (looking at it from NHprof), it's being sent as a string when doing > >> the INSERT which is where the confusion is occuring. > >> > >> Cheers, > >> > >> Chris. > >> > >> 2009/1/20 Stefan Steinegger <[email protected]>: > >> > > >> > I don't understand the problem. Where does NHibernate "generate a date > >> > format"? You should have a DateTime in the entity and a date in the > >> > database. Dates in queries should be passed as parameters, not as > >> > strings. Doesn't this work? > >> > > >> > On 19 Jan., 16:38, "[email protected]" > >> > <[email protected]> wrote: > >> >> Is there a way to force hibernate to generate a non-locale-specific > >> >> date format so I can insert dates without worrying about if they are > >> >> interpreted as US/UK english? > >> >> > >> >> At the moment they are being sent as text i.e. '06/07/2008 > >> >> 12:14:00'. > >> >> > >> >> Unfortunately some muppet set up our DB and web servers with > different > >> >> locales so 06/07 is ambiguous (US English SQL Server 2005 server, UK > >> >> English Windows 2008 client). > >> >> > >> >> Using NH 2.0.1 as bundled by spring.net 1.2.0, mssql2005 dialect and > >> >> sqlserver-2.0 provider. > >> >> > >> >> Any help appreciated. > >> >> > >> >> Cheers, > >> >> > >> >> Chris. > >> > > > >> > > >> > >> > >> > >> -- > >> Chris Smith > >> http://www.chrisjsmith.me.uk/ > >> > >> > > > > > > > > > > > > > -- > Chris Smith > http://www.chrisjsmith.me.uk/ > > > > --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "nhusers" group. To post to this group, send email to [email protected] To unsubscribe from this group, send email to [email protected] For more options, visit this group at http://groups.google.com/group/nhusers?hl=en -~----------~----~----~----~------~----~------~--~---
