This is a migrated thread and some comments may be shown as answers.

DateTime Autoset Mode -- UTC (GetUTCDate())

1 Answer 27 Views
General Discussions
This is a migrated thread and some comments may be shown as answers.
This question is locked. New answers and comments are not allowed.
Tom
Top achievements
Rank 1
Tom asked on 08 Nov 2013, 09:46 PM

I have a mapping with the following defined:

HasProperty(x => x.ADateTimeField).IsCalculatedOn(DateTimeAutosetMode.Insert);

This correctly sets the date on Inserts, but I have two questions:

1.   This will be the DATABASE SERVER time, in all cases -- is that correct?

2.   Is there any way to set this to the UTC time?


Thanks

1 Answer, 1 is accepted

Sort by
0
Ady
Telerik team
answered on 13 Nov 2013, 05:12 PM
Hello Tom,,

1) This is the client side generated value - DateTime.Now. 
2)In order to specify that a UTC value should be generated you can set the 'BackendConfiguration.Runtime.UseUTCForAutoSetValues=true'

Hope this helps. 
Do get back in case you need further assistance.

Regards,
Ady
Telerik
OpenAccess ORM Q3 2013 simplifies your model operations even further providing you with greater flexibility. Check out the list of new features shipped with our latest release!
Tags
General Discussions
Asked by
Tom
Top achievements
Rank 1
Answers by
Ady
Telerik team
Share this question
or