Web Wiz - Green Windows Web Hosting

  New Posts New Posts RSS Feed - cant change timezone!
  FAQ FAQ  Forum Search   Events   Register Register  Login Login

cant change timezone!

 Post Reply Post Reply Page  <12
Author
testp View Drop Down
Newbie
Newbie


Joined: 21 May 2003
Status: Offline
Points: 18
Post Options Post Options   Thanks (0) Thanks(0)   Quote testp Quote  Post ReplyReply Direct Link To This Post Posted: 10 June 2003 at 12:54pm

I'm thinking that it can be accomplished by code. Have an admin option to select the time zone the server is located in, then calculate all other times based on that.

This would be very useful as there are a lot of community forums out there that are place-specific.

Back to Top
Darryld View Drop Down
Newbie
Newbie


Joined: 10 June 2003
Status: Offline
Points: 5
Post Options Post Options   Thanks (0) Thanks(0)   Quote Darryld Quote  Post ReplyReply Direct Link To This Post Posted: 11 June 2003 at 6:56am

Thanks Borg.

As least I know now and its not me going blind

Quality forum

Back to Top
AlbertoP View Drop Down
Newbie
Newbie


Joined: 20 July 2003
Location: Italy
Status: Offline
Points: 1
Post Options Post Options   Thanks (0) Thanks(0)   Quote AlbertoP Quote  Post ReplyReply Direct Link To This Post Posted: 20 July 2003 at 7:45am

Hi,

it's not so difficult to return to old functionality (WWF 6.XX) with plus of having server and user time zone.

Don't do this if you are not enough skilled.

Append two fields to forum's database table tblDatetimeFormat

Field 1: Server_offset           (Text length 1)
Field 2: Server_offset_hours  (Integer)

In these fields you have to insert your timezone (i.e. if server is in the USA and forum in Germany you have to set + 7)

 

Modify file /functions/functions_date_time_format.asp this way

modify raw 52 from
Dim saryDateTimeData(17)
to
Dim saryDateTimeData(19)

Insert these lines after raw 92
 saryDateTimeData(18) = rsDateTimeFormat("Server_offset")
 saryDateTimeData(19) = rsDateTimeFormat("Server_offset_hours")

Modify function DateFormat; insert rows in bold:

 'If the array is empty set the date as wish
 If isNull(saryDateTimeData) Then
  
  'Set the date as orginal
  DateFormat = dtmDate
  
 'If there is a data in the array then format the date
 Else
  'Place the server time off set onto the recorded database time
  If saryDateTimeData(18) = "+" Then
   dtmDate = DateAdd("h", + CInt(saryDateTimeData(19)), dtmDate)
  ElseIf saryDateTimeData(18) = "-" Then
   dtmDate = DateAdd("h", - CInt(saryDateTimeData(19)), dtmDate)
  End If
  'Place the users time off set onto the recorded database time
  If strTimeOffSet = "+" Then
...

Same for TimeFormat function (insert rows in bold)

 'If the array is empty then return tyhe original time
 If isNull(saryDateTimeData) Then
  
  'Set the date as wish
  TimeFormat = dtmTime
  
 'If there is a data in the array then format the date
 Else
  'Place the server time off set onto the recorded database time
  If saryDateTimeData(18) = "+" Then
   dtmTime = DateAdd("h", + CInt(saryDateTimeData(19)), dtmTime)
  ElseIf saryDateTimeData(18) = "-" Then
   dtmTime = DateAdd("h", - CInt(saryDateTimeData(19)), dtmTime)
  End If
  'Place the users time off-set onto the recorded database time
  If strTimeOffSet = "+" Then
...

This way you have both the old WWF functionality and a new one that consider both Server and User TimeZone.

 

 



Edited by AlbertoP
Back to Top
 Post Reply Post Reply Page  <12

Forum Jump Forum Permissions View Drop Down

Forum Software by Web Wiz Forums® version 12.08
Copyright ©2001-2026 Web Wiz Ltd.


Become a Fan on Facebook Follow us on X Connect with us on LinkedIn Web Wiz Blogs
About Web Wiz | Contact Web Wiz | Terms & Conditions | Cookies | Privacy Notice

Web Wiz is the trading name of Web Wiz Ltd. Company registration No. 05977755. Registered in England and Wales.
Registered office: Web Wiz Ltd, Unit 18, The Glenmore Centre, Fancy Road, Poole, Dorset, BH12 4FB, UK.

Prices exclude VAT at 20% unless otherwise stated. VAT No. GB988999105 - $, € prices shown as a guideline only.

Copyright ©2001-2026 Web Wiz Ltd. All rights reserved.