Support for UTC dates in db?

Stimulsoft Reports.NET discussion
Post Reply
hfirst
Posts: 25
Joined: Mon Apr 20, 2015 2:11 pm

Support for UTC dates in db?

Post by hfirst »

I am storing my dates in the db in utc date/time. I found the below post for converting, but really, wow, do I have to now type that in for every single date field on all my reports?

http://forum.stimulsoft.com/viewtopic.p ... utc#p65328

Is there a feature I've missed or any plans for a feature where I could just toggle a property on the report to automatically have it convert all dates from utc to local for me? Maybe even an override on each date field?

If there are no new features, is there any other better way to globally handle this?
Alex K.
Posts: 6488
Joined: Thu Jul 29, 2010 2:37 am

Re: Support for UTC dates in db?

Post by Alex K. »

Hello,

Unfortunately, we do not made any changes in that direction.
You can use the previous solution from the post or try to use the convert in the sql query.

Thank you.
hfirst
Posts: 25
Joined: Mon Apr 20, 2015 2:11 pm

Re: Support for UTC dates in db?

Post by hfirst »

That would be a lot of work.

We have a source code license. Could you give me some quick pointers to a possible source code function that all date formatting goes through that I could possibly just fix this in a custom build of the code? Or maybe the routine that is extracting the data from the data source? Hopefully there are just a few key points for dates that I can intercept and do the conversion there.
HighAley
Posts: 8430
Joined: Wed Jun 08, 2011 7:40 am
Location: Stimulsoft Office

Re: Support for UTC dates in db?

Post by HighAley »

Hello.

You could try to change the DataTime on the Data Source level.
But we need to know what type of Data Source you use to give you an exact advice.

Thank you.
hfirst
Posts: 25
Joined: Mon Apr 20, 2015 2:11 pm

Re: Support for UTC dates in db?

Post by hfirst »

sqlserver stored procedures
HighAley
Posts: 8430
Joined: Wed Jun 08, 2011 7:40 am
Location: Stimulsoft Office

Re: Support for UTC dates in db?

Post by HighAley »

Hello.

Please, look at the RetrieveData method in the Stimulsoft.Report\Dictionary\DataSources\Sql\StiSqlSource.cs file.

Thank you.
Post Reply