# Gmt time problem

**URL:** https://forum.kirupa.com/t/gmt-time-problem/277161
**Category:** Uncategorized
**Created:** [December 8, 2008, 8:54pm UTC](https://forum.kirupa.com/t/gmt-time-problem/277161 "2008-12-08T20:54:00Z")
**Posts on this page:** 1
**Page:** 1

<div class="post-metadata">

### Author: ![raoulpetrus](https://avatars.discourse-cdn.com/v4/letter/r/e9bcb4/32.png) [@raoulpetrus](https://forum.kirupa.com/u/raoulpetrus)
#### Post date: [December 8, 2008, 8:54pm UTC](https://forum.kirupa.com/t/gmt-time-problem/277161/1 "2008-12-08T20:54:00Z")

</div>

i am working on a clock and i cant seem to get the time right.  
Hosting in another timezone, a site with a clock

i would have the clock run my GMT time for my visitors

thougt i’d solve the problem using the following code:

myDate = new Date();  
timeTextField = ((myDate.getHours()-2) + “:” + myDate.getMinutes() + “:” + myDate.getSeconds());  
play();

but it seems it will just deduct two units of my time so 01:00 will give a fail…

any suggestions?
