Have you already found a solution for the DST problem? I was trying to solve the same issue when I found this:
http://www.sortea2.com/blog/2008/11/zonas-horarias-y-php/ It describes almost the same scenario you talked about. I tried the solution and works great. The article is written in spanish; but I hope you'll get the general idea. Ask me if you need a translation of a section. Hope this helps! On 4 mar, 01:12, Sidney <[email protected]> wrote: > Glad you got your solution Vikas. > > I am trying to design a solution for a broader, similar problem: > > My site is available globaly, and runs Games according to a date/time > schedule (thinkonlinePoker). I can record the schedule according to > GMT as a base, but I want to show users when the game will start time > using their local time. > > I can record the user's offset from GMT, and do simple addition/ > subtraction, BUT time offsets change (daylight-saving). In fact the > daylight savings rules change periodically; here in Australia QLD has > no daylight savings where as NSW does. > > Is there any accepted standard-aproach for dealing with global > timezones e.g. a callable webservice to get GMT offset for a country/ > state? I doubt it. > > Right now IthinkI'll have to use a countdown e.g. "Game starts in > 1d, 7h, 24m, which is _approx_ 7:30p.m. on Thursday in your > location" . This seems like the most straightforward and reliable > solution. > > When users input the scheduled time though, they will want to input > using local time. I guess I could show on screen what their local time > *should* be NOW and let them correct it so that the user's offset gets > updated and the input time is correctly converted to GMT? > > But the what then happens if that locale changes to daylight savings > (summer time) before the game starts and the player misses the game > that they're organising...... Oh crap I hate time zones. > > One obvious note: When the northern hemisphere changes in one > direction, the southern hemisphere changes in the other direction > (maybe within 1-2 weeks). E.g. a time difference (UK to Aus) of 9 > hours becomes 11 hours (Mum never gets that right when she 'phones) > and different timezones in other countries change aroundabout the > same date. > > Can anyonethinkof a better solution for this? Am I over-egging the > pudding? > > Sid. > > On Mar 2, 7:51 pm, vikas <[email protected]> wrote: > > > ya this is really helpful to me.. > > thanks --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "CakePHP" group. To post to this group, send email to [email protected] To unsubscribe from this group, send email to [email protected] For more options, visit this group at http://groups.google.com/group/cake-php?hl=en -~----------~----~----~----~------~----~------~--~---
