I have a dataset that is returned by a web service. It contains a date column, among other columns, and this date is an UTC date(so, GMT time). Now, only when i display it in a datagridview, i need to display the local time depending on the user's local regional settings. Here is what I ended up doing....
// Bind the Cell formatting event
dgvGrid.CellFormatting += new DataGridViewCellFormattingEventHandler(dgvGrid_CellFormatting);
// Formatting event handler
void dgvGrid_CellFormatting(object sender, DataGridViewCellFormattingEventArgs e)
if( e.Value.GetType() == typeof(DateTime) )
e.CellStyle.Format = "G";
// This is the key. Converts GMT time to local time by adding the offset.
e.Value = ((DateTime)e.Value).ToLocalTime();