-
Notifications
You must be signed in to change notification settings - Fork 50
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
DateTime in UTC? #86
Comments
Forgot to mention that all dates are being saved as UTC. |
Hm, I always work with GMT dates and never had a problem, but anyways... try this in your app's start up class PocoFactory.RegisterConverterFor<DateTime>(obj=>{ /* ensure it's UTC */}) |
Thanks for the quick response! I have tried what you suggested but the converter never gets called:
I placed this in my Application_Start and a few other places (just in case) with no luck. Any other thoughts? Cheers Cameron From: Mike Mogosanu [mailto:[email protected]] Hm, I always work with GMT dates and never had a problem, but anyways... try this in your app's start up class PocoFactory.RegisterConverterFor(obj=>{ /* ensure it's UTC */}) — |
Can you show me a code sample of the query itself? |
Ok, I think I've found the problem. The mapper invokes directly |
Fixed it. You can update your nuget pack now (v.2.3.14). |
Thanks Mike, I tried the new package and the DateTime converter worked. Unfortunately, I was seeing consistent database timeouts (mysql/mariadb) when issuing multiple updates in a single transaction. Rolling back to SqlFu 2.3.12 resolved the timeout issue. I haven’t had a chance to dig deeper. Any changes you are aware of that may be causing the timeout/deadlock – or anything I can do to help you identify the problem? Thanks Cameron From: Mike Mogosanu [mailto:[email protected]] Fixed it. You can update your nuget pack now (v.2.3.14). — |
Hi Mike, |
Hi Mike, I can confirm there was a problem on our side and your changes work perfectly. Thanks again for the rapid response! Cheers Cameron From: Cameron Rochester [mailto:[email protected]] Hi Mike, I suspect the timeout I mentioned below has nothing to do with your changes. I will get back to you with a confirmation tomorrow. Thanks On 7 Jun 2016 8:12 am, Cameron Rochester <[email protected] mailto:[email protected] > wrote: Thanks Mike, I tried the new package and the DateTime converter worked. Unfortunately, I was seeing consistent database timeouts (mysql/mariadb) when issuing multiple updates in a single transaction. Rolling back to SqlFu 2.3.12 resolved the timeout issue. I haven’t had a chance to dig deeper. Any changes you are aware of that may be causing the timeout/deadlock – or anything I can do to help you identify the problem? Thanks Cameron From: Mike Mogosanu [mailto:[email protected]] Fixed it. You can update your nuget pack now (v.2.3.14). — |
I am using SqlFu v2 with mysql and would like all DateTime's to be set to DateTimeKind.Utc. Can you recommend a way to do this for all SqlFu queries?
I can certainly force UTC manually on the DateTime properties for the objects I get back from SqlFu - but we have many different objects and I would rather not have to do the same thing over and over.
Thanks for your awesome library!
Cameron
The text was updated successfully, but these errors were encountered: