I have a free web hosting account with portland.co.uk, and I would like to use SSI to show when my pages were updated, and to show current date on homepage, but their servers are located in Britain so it is British time. How can I get it to return Eastern Standard Time info?
Thank you very much in advance!
- cml
jrhyley
11-03-2004, 02:03 AM
Looks like this thread is dead, but it did come up in google while I was trying to solve this very same problem, and I ended up having to come up with my own solution, so here it is. It's a mix of SSI and javascript:
<script type="text/javascript"><!--
<!--#config timefmt="%H" -->
hours=<!--#echo var="DATE_GMT" -->;
<!--#config timefmt="%M" -->
mins=<!--#echo var="DATE_GMT" -->;
function dotime(lessGMT) {
lessGMT += hours;
if (lessGMT < 0) lessGMT+=24;
return lessGMT;
}
document.writeln("Eastern: " + dotime(-5) + ":" + mins + '<br>');
//-->
</script>
Be advised you would have to change dotime(-5) to dotime(-6) for daylight savings time, or to your own GMT offset to do another time zone.