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
https://forums.phpfreaks.com/topic/112711-confused-with-gmt-and-timezones/
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)?

 

Archived

This topic is now archived and is closed to further replies.

×
×
  • 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.