Date time time Convertion From UTC to Local Twice
<p>I want to convert my time to univeral time when i store date time in database and convert back to system time when i retreve from the database </p>

<p>both of them i have done it success fully by creating a fuctions <strong>ConvertToLocalTime()</strong>
and <strong>ConvertToUniversalTime()</strong></p>

<p>the code for convert to local time is given below</p>

<pre><code>    public void ConvertToLocalTime()
    {
        string szTimezoneinfoid = TimeZoneInfo.Local.Id.ToString();
        TimeZoneInfo tzInfo = TimeZoneInfo.FindSystemTimeZoneById(szTimezoneinfoid);

        this.m_dtCreatedDate = TimeZoneInfo.ConvertTimeFromUtc(m_dtCreatedDate, tzInfo);
    }
</code></pre>

<p>when i call a function <strong>Shipment.ConvertToLocalTime()</strong> it changes the shipment created date to local time till this it works fine .</p>

<p>Now if i call the <strong>Shipment.ConvertToLocalTime()</strong> again then it consider the localtime again as UTC and convert it to local time </p>

<p>Is there any way to block the conversion to local time if it is already in local time.</p>

<p>Does there any way that we can get the time zone of the datetime?</p>
