My problem is: I have a lot of data containg a date time (in own local time) and I need to convert It to UTC. It looks so:
class Data
{
int id; //Some id for database
DateTime time; //Time in local time, i need to convert it to utc
}
//Converting:
1)Find this id in database and extract some info (which excatly?)
2)Convert time to UTC
My question is: which sort of data I need to keep in database in order to convert time correctly?
My version is: to keep an integer difference in hours between local time and utc and convert by adding It to local time. But Is this appropriate solution?