Jump to content

Confused with GMT and timezones


PC Nerd

Recommended Posts

Hi,

 

Ive got my self into a pickle with times.

IVe got a form where people enter the time/date of an event as GMT.  it need it to store that timezone into the database..... ( its an INT field (yes Timestamp i know but anyway)) - and then it takes it out and compares it with a search term that is also in GMT.

 

ie - all input/output and storage is in GMT.

 

however my server is set to GMT -600 (http://wwp.greenwichmeantime.com/time-zone/usa/mountain-time/)

 

now:

Im placing my times in from GMT +1000, but ive converted them toGMT ( so instead of puting in 2100 i put in 1100 etc).

 

 

I think my server is doign somethign weird with timezones.

 

Could someone recomend a goot read through somewhere explaining the use of GMT and strtotime, date, gmmktime etc so that i can get my head aroudn this?

 

Thanks

Link to comment
Share on other sites

*bump*

 

i think i confused myself when i posted this ( and thats not a good thing!!!).

 

here is my main question:

 

if a client coonnects and enters a time (already in GMT)....  the server is set a eg GMT -600, so that now returns the time at that timezone.  when i convert times to GMT, does it treat my already formatted time as Timezone, and therefore adding 6 hours to it?

 

I suspect that that is what is happening, and if so how could i help it ( assumign that my users/clients still enter data formatted to GMT)?

 

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.