I did something very similar, but now I think I prefer using javascript to convert all times to local on the client side. The server will give all the time in UTC on the generated page, and javascript will convert it after the page loads.
This eliminates the confusion in the server-side code, as I always know what time it is (UTC). On the client side, I use jquery and the each () function to format all the time values at the same time. I write every time as unix time in a hidden field so that it is easy to handle using jquery.
, , , a) javascript, ) JavaScript, .