If you want that, you can just remove the caching, and it'll always accurately reflect the server time. However who changes their local clock? I think we could definitely get away with caching it for 7 days.
Same thing with DST (I even mentioned it). Also once you have an accurate time, the javascript time object includes the DST logic itself I think. We're only dealing with an inaccurate local clock, we don't have to reimplement whatever ISO standard stands for Time. As soon as we have the delta between local time and server time, we're golden.
Comments
Have you tested it over a daylight savings period or if the user changed their local clock?
If you want that, you can just remove the caching, and it'll always accurately reflect the server time. However who changes their local clock? I think we could definitely get away with caching it for 7 days.
Same thing with DST (I even mentioned it). Also once you have an accurate time, the javascript time object includes the DST logic itself I think. We're only dealing with an inaccurate local clock, we don't have to reimplement whatever ISO standard stands for Time. As soon as we have the delta between local time and server time, we're golden.