Timezone MOD - Postet den (4744 Views)
Senior Member
MarkJH
Innlegg: 1722
1722
Every other forum software I know has a section in the user's profile where they can change the time displayed to match their timezone. Now, isn't it about time that we had something like this for Snitz?
It would be just a dropdown box in the profile that gave a -12/+12 from GMT (or whatever) and when the clocks went back or forth it would be completely down to the user to adjust the time in their profile.
That's all it needs. No complicated equations to calculate daylight savings etc.
Please tell me if I'm over-simplifying things. smile<
Bandlink.net - http://www.bandlink.net/
Bandlink Music Forums - http://www.bandlink.net/forum/
   
 Sidestørrelse 
Postet den
Snitz Forums Admin
ruirib
Innlegg: 26364
26364
It has been done, since that was available for the beta of the upcoming version of Snitz. DOn't know whether it is available as an independent mod, though.<
Postet den
Development Team Member
-gary
Innlegg: 406
406
I posted a simple solution a while back, but evertime I try and search the archives it times out so I can't give you a link. It wasn't a mod though since the collecting and storing of the users zone was up to you. I only gave the code for adjusting the displayed time which is trivial.<
Postet den
Senior Member
MarkJH
Innlegg: 1722
1722
DOn't know whether it is available as an independent mod, though.
I haven't seen it. The only thing I've found is what Bozden was working on for version 4. That was two years ago.
Gary, I'd love to see your code... if it can be found! I don't think it would be too difficult to work with that and a dropdown in the profile to make a working MOD.<
Bandlink.net - http://www.bandlink.net/
Bandlink Music Forums - http://www.bandlink.net/forum/
Postet den
Medlem er låst
laser
Innlegg: 3859
3859
In Image's forum there is a timezone feature, so the mod for that must be floating around somewhere.<
Postet den
Forum Admin
HuwR
Innlegg: 20611
20611
The code was written by me, but was never released as a MOD, mainly because it involved a lot of core code changes and was a bit quirky on some servers.<
Postet den
Development Team Member
-gary
Innlegg: 406
406
Store the users time zone in the strM_TIMEZONE variable. Set the "Time Adjustment" setting in the admin panel to the inverse of your time zone to bring the server to GMT. Add the code below to the chkDate function in inc_func_common.asp.
The hardest part is modifying the profile pages to store the users time zone.
if fDate <> "" and strM_TIMEZONE <> "" Then
fDate = DateToStr(DateAdd("h", strM_TIMEZONE, strToDate(fDate)))
End if<
Postet den
Senior Member
MarkJH
Innlegg: 1722
1722
The code was written by me, but was never released as a MOD, mainly because it involved a lot of core code changes and was a bit quirky on some servers.
But wasn't your code a lot more complicated than that? Didn't it take into account daylight saving adjustments around the world? I'm just looking for something that leaves all of that down to the user. If the clocks go forward or back, they make the adjustment.
Thanks for supplying the code, Gary. Would somebody have a way of incorporating that into the user profile?<
Bandlink.net - http://www.bandlink.net/
Bandlink Music Forums - http://www.bandlink.net/forum/
Postet den
Average Member
cripto9t
Innlegg: 881
881
Mark, after seeing the earlier thread on this, I Used Garys suggestions and got this working. I used Invision Board(log-in - demo, demo) as a model, in fact the select box I use is Invision Boards smile.
As Gary said the server/forum time is set to GMT (I did play around with this and found it to be best). Then members adjust time in thier profile, there is an adjustment for DST.
I never released it as a mod because I wasn't to sure of it. But it has passed all my testing so far.
If your interested in testing it I will get the code together.
<
    _-/Cripto9t\-_
Postet den
Senior Member
MarkJH
Innlegg: 1722
1722
Looks good, Cripto.
My only concern with this MOD is the DST bit. My server is based in the US. The clocks went forward one week earlier in the UK than in the US. Wouldn't this cause problems?<
Bandlink.net - http://www.bandlink.net/
Bandlink Music Forums - http://www.bandlink.net/forum/
Postet den
Medlem er låst
laser
Innlegg: 3859
3859
Yep, Aussie DST works a few weeks diff to USA DST, NZ DST changes are different again, then some timezones do not have DST at all ..... just remind the users to do the old +/- 1 when they need to.<
Du må legge inn en melding