I've searched through support and these forums, and while I've found several answers to this question, none of them specifically suit my needs.
I'm storing all my DateTime data in UTC format in my SQL 2005 database. What I'd like is extend the RadDatePicker (and RadDateTimePicker) so that when they display a date from the DB, they automatically shift it to the loca timezone. Then when they write any date to the DB, they shift it back to UTC.
I was thinking of creating an extension class that inherits the RadDateTimePicker and overriding the DataBind() method within it. I'm not quite sure how to accomplish this though. It'd be easy enough to shift the displayed date when it's read from the database, but I can't figure out how I would shift the date written back to the DB.
I've also seen places on these forums talking about AJAX and Javascript, and how the control will provide the UTC-shifted date using some of those methods.
Most of my RadPickers are databound objects on the EditTemplates of RadGrids. They are tied to LinqDataSources and not populated in the codebehind, so manipulating the times through codebehind would take a lot of reengineering.
Any suggestions on how I could create an extension class or manipulate the data on the client side, so that I am always looking at local time but always working with UTC in the database?
I'm storing all my DateTime data in UTC format in my SQL 2005 database. What I'd like is extend the RadDatePicker (and RadDateTimePicker) so that when they display a date from the DB, they automatically shift it to the loca timezone. Then when they write any date to the DB, they shift it back to UTC.
I was thinking of creating an extension class that inherits the RadDateTimePicker and overriding the DataBind() method within it. I'm not quite sure how to accomplish this though. It'd be easy enough to shift the displayed date when it's read from the database, but I can't figure out how I would shift the date written back to the DB.
I've also seen places on these forums talking about AJAX and Javascript, and how the control will provide the UTC-shifted date using some of those methods.
Most of my RadPickers are databound objects on the EditTemplates of RadGrids. They are tied to LinqDataSources and not populated in the codebehind, so manipulating the times through codebehind would take a lot of reengineering.
Any suggestions on how I could create an extension class or manipulate the data on the client side, so that I am always looking at local time but always working with UTC in the database?