Thread: Re: [pLog-General] About timezones...
Brought to you by:
jondaley
From: mhe<mh...@lt...> - 2003-11-17 20:09:30
|
I think we need a per blog setting for timeoffset in seconds, +/- sec, the data is stored in with the server date, no touch of dates till now, mysql timestamp > unix stamp > add user offset > mktime > template ? I think its important to establish it as a per blog setting, for multiple blogs, ciao Mathias |
From: Mike 'y. W. <yo...@pa...> - 2003-11-17 20:27:14
|
I was thinking of getting the time from some GMT server and adding the timezone, selected from a dropdown box. I think thats what phpBB does. I'll have a look once I turn on my server. -- Mike "yomcat" Welsh NZ Tuatara http://www.nztuatara.com |
From: Rafael M. <ra...@dr...> - 2003-11-17 21:35:55
|
You could just use SUBDATE() and then UNIX_TIMESTAMP() -- Rafael Montagud (a.k.a. Dranor) http://www.dranor.net |
From: Mike 'y. W. <yo...@pa...> - 2003-11-26 18:25:12
|
on 27/11/03 4:09 AM, Oscar Renalias at os...@re... wrote: > In the first case, they would have to select at least two timezones: the > timezone where the hosting service is and the timezone where the user is. I > am not sure if computer illiterate users will be able to understand this. The > second choice looks easier to understand and to implement but what do you > think? I like the second option the most... They both seem to be pretty much the same anyway. I just involves a little Math ;) The 2nd one sounds easiest. -- Mike Welsh Proud to be 98% Microsoft Free |
From: Brian M R. <bm...@ch...> - 2003-11-26 18:43:48
|
I think for the non-computer inclined people selecting a time difference between where they are and where the server is will be easier. However I think that selecting TZ would be more professional. Mike 'yomcat' Welsh wrote: >They both seem to be pretty much the same anyway. I just involves a little >Math ;) >The 2nd one sounds easiest. > > |
From: Mike 'y. W. <yo...@pa...> - 2003-11-27 18:26:21
|
on 27/11/03 6:43 AM, Brian M Rupe at bm...@ch... wrote: > However I think that selecting TZ would be more professional. How about doing it all in the background? 1. Get the server time 2. use JavaScript to get the user's time 3. Get the difference and dump it onto the server's time -- yomcat http://yomcat.geek.nz |
From: Oscar R. <os...@re...> - 2003-11-27 21:34:28
|
On Thursday 27 November 2003 21:27, Mike 'yomcat' Welsh wrote: > on 27/11/03 6:43 AM, Brian M Rupe at bm...@ch... wrote: > > However I think that selecting TZ would be more professional. > > How about doing it all in the background? > 1. Get the server time > 2. use JavaScript to get the user's time > 3. Get the difference and dump it onto the server's time I don't understand this system... what do you mean? Oscar. |
From: Mike 'y. W. <yo...@pa...> - 2003-11-28 07:00:27
|
on 28/11/03 9:31 AM, Oscar Renalias at os...@re... wrote: > I don't understand this system... what do you mean? It all happens in the background, and the times are adjusted to the viewer's timezone. I'll try to explain it in more depth (or get some code). Just like now, the time is grabbed from the server. Then, use getTime() (or whatever it is) to get the viewer's time. Convert it to whatever format to get it in the same form as the PHP server time. Then get the difference between the two numbers (user-server) and add this to the server time (server+difference), and print that number out. I could do it in PHP without grabbing the JS... Something like this: ($viewer_time - $server_time) == $difference ($server_time + $difference) == $echo_this -- Mike http://yomcat.geek.nz http://www.nztuatara.com |
From: Oscar R. <os...@re...> - 2003-11-28 13:44:21
|
On Friday 28 November 2003 10:02, Mike 'yomcat' Welsh wrote: > on 28/11/03 9:31 AM, Oscar Renalias at os...@re... wrote: > > I don't understand this system... what do you mean? > > It all happens in the background, and the times are adjusted to the > viewer's timezone. > I'll try to explain it in more depth (or get some code). > Just like now, the time is grabbed from the server. Then, use getTime() (or > whatever it is) to get the viewer's time. Convert it to whatever format to > get it in the same form as the PHP server time. Then get the difference > between the two numbers (user-server) and add this to the server time > (server+difference), and print that number out. I could do it in PHP > without grabbing the JS... > > Something like this: > ($viewer_time - $server_time) == $difference > ($server_time + $difference) == $echo_this Could be, but I don't really fancy using Javascript because if we ever develop a template for mobile devices (it's an idea I've had for a long time) that means that there is very little support (if any) for js in these new fancy mobile phones with support for xhtml. Also, I'm all for simplicity and I like more the idea of adding/substracting time differences rather than dealing with two different time zones... I know it's perhaps less "professional" but it's *apparently* simpler to implement. I'll have a look at it as soon as possible. Been quite busy lately... Have a nice weekend :) Oscar. |
From: Oscar R. <os...@re...> - 2003-11-18 18:14:57
|
> I think we need a per blog setting for timeoffset in seconds, +/- sec, > the data is stored in with the server date, no touch of dates till now, > > mysql timestamp > unix stamp > add user offset > mktime > template While letting the user choose a time-offset between the blog and his/her blog seems to me like an easier solution, I still don't know wether it is more "elegant" to deal with Timezones or time offsets... Does any of you know of any PHP software that deals with timezones? I only know of phpBB (I'll have a look at its source code) > I think its important to establish it as a per blog setting, for multiple > blogs, That is of course the idea :) Oscar. |