Geekzone: technology news, blogs, forums
Guest
Welcome Guest.
You haven't logged in yet. If you don't have an account you can register now.




669 posts

Ultimate Geek
+1 received by user: 15

Subscriber

Topic # 109266 17-Sep-2012 09:33 Send private message

Im not really sure if this is the correct forum so I apologise in advance if its not.

Ive built a site for a friend using concrete5 and hosted by JoneSolutions as per a couple of recommendations on here. Its all been excellent except for the final piece of the puzzle which is using an existing 'add-on' called Upcoming Events to simply produces a list of events from a google calendar.

The add-on itself works but the events are all listed 24 hours after they should be. For example an event listed 17/09/2012 at 4-5pm will show up as 18/09/2012 4-5pm.

Ive set the timezone in the site.php file to be Pacific/Auckland to handle the US hosting. Ive updated the add-on with the same timezone and the google calendar is set to Pacific/Auckland also. The developer hasnt replied at all to my support request so I thought Id ask here.

If I use Australia/Perth I get the correct date and the time is correct when factoring in they are four hours behind. Its correct for Adelaide but not for Melbourne or Sydney. The time is correct (with the delay) but the date is now +24 hours.

I know its a very generic question but is there anything else I need to consider with regards to PHP timezones, hosting in the US and using NZ calendars ?

[e] spelling !




X-Case Q-Box | Gigabyte GA-MA78GM-S2H 780G with Onboard ATI HD3200 | AMD Phenom X4 9500 CPU | Corsair 2GB DDR2-800 x 2 | WD Caviar 1TB HDD x 2 | HVR-4000 with MCE Remote | Win 7 Home Premium | Mediaportal 1.4.0 | CoreAVC2.0 | Samsung UN32B6000 32" LED | Sony STR-K660P Receiver

Create new topic
BDFL
49919 posts

Uber Geek
+1 received by user: 4621

Administrator
Trusted
Geekzone
Subscriber

  Reply # 686965 17-Sep-2012 09:49 Send private message

And what is the timezone on the server itself? Is there any configuration you have to set in your script regarding what is the server timezone in addition to the local timezone?






669 posts

Ultimate Geek
+1 received by user: 15

Subscriber

  Reply # 686968 17-Sep-2012 09:58 Send private message

Until now Ive just assumed the server was in the US, so Ive asked them to confirm where it actually is.

Within the add-on there is only the option to set the local timezone, not the server timezone.

7746 posts

Uber Geek
+1 received by user: 316

Trusted
Subscriber

  Reply # 686976 17-Sep-2012 10:12 Send private message

If it's not too late... best practice (imo) is to store all date/time's in UTC in your database and adjust the display of the date/time for your users's current timezone in the UI.

This will save you untold trouble down the line.

Voice Engineer @ Orcon
1919 posts

Uber Geek
+1 received by user: 432

Trusted
Orcon
Subscriber

  Reply # 686980 17-Sep-2012 10:13 Send private message

Ragnor: If it's not too late... best practice (imo) is to store all date/time's in GMT or UTC in your database and adjust the display of the date/time to your users's current timezone in the UI.

This will save you untold trouble down the line.


QFT... a much better way to go



669 posts

Ultimate Geek
+1 received by user: 15

Subscriber

  Reply # 686982 17-Sep-2012 10:17 Send private message

JonesSolutions have confirmed the server timezone is America/New_York.

I understand the preference to store the dates and times in UTC and updating them on the GUI only but with my friend using google and the add-on only allowing me to update a local timezone I have little to no control over how they are stored.

[edit]
JoneSolutions say the timezone is set in a serverwide php/ini file. Am I right in thinking there should also be one of those in the site itself which I could set ?






X-Case Q-Box | Gigabyte GA-MA78GM-S2H 780G with Onboard ATI HD3200 | AMD Phenom X4 9500 CPU | Corsair 2GB DDR2-800 x 2 | WD Caviar 1TB HDD x 2 | HVR-4000 with MCE Remote | Win 7 Home Premium | Mediaportal 1.4.0 | CoreAVC2.0 | Samsung UN32B6000 32" LED | Sony STR-K660P Receiver

1057 posts

Uber Geek
+1 received by user: 72


  Reply # 687026 17-Sep-2012 11:46 Send private message

I assume your DB is mysql, what is the timezone on that set to?



669 posts

Ultimate Geek
+1 received by user: 15

Subscriber

  Reply # 687043 17-Sep-2012 12:01 Send private message

@global.time_zone and @session.time_zone are both set to SYSTEM
@system_time_zone is set to EDT 



Create new topic




Twitter »
Follow us to receive Twitter updates when new discussions are posted in our forums:



Follow us to receive Twitter updates when news items and blogs are posted in our frontpage:



Follow us to receive Twitter updates when tech item prices are listed in our price comparison site:





Trending now »

Hot discussions in our forums right now:

How stable are snap IP addresses?
Created by Physn, last reply by timmmay on 23-Oct-2014 10:38 (19 replies)
Pages... 2


Spark Socialiser
Created by freitasm, last reply by freitasm on 22-Oct-2014 18:39 (34 replies)
Pages... 2 3


$39 iPhone plan goneburger
Created by MadEngineer, last reply by Demeter on 23-Oct-2014 16:09 (16 replies)
Pages... 2


American legal jurisdiction in New Zealand
Created by ajobbins, last reply by gzt on 21-Oct-2014 14:58 (30 replies)
Pages... 2


iPad Air 2 and iPad Mini 3. Gonna get one?
Created by Dingbatt, last reply by Geektastic on 23-Oct-2014 15:13 (98 replies)
Pages... 5 6 7


Snap have failed our company!
Created by dafman, last reply by NonprayingMantis on 23-Oct-2014 11:56 (36 replies)
Pages... 2 3


Theif taunts 12 year old via stolen laptop
Created by macuser, last reply by charsleysa on 22-Oct-2014 23:49 (12 replies)

22nd Only: PB Tech BROTHER HL1110 Mono laser Printer $15 shipped(after $30 cashback)
Created by loceff13, last reply by loceff13 on 23-Oct-2014 08:55 (23 replies)
Pages... 2



Geekzone Live »

Try automatic live updates from Geekzone directly in your browser, without refreshing the page, with Geekzone Live now.

Are you subscribed to our RSS feed? You can download the latest headlines and summaries from our stories directly to your computer or smartphone by using a feed reader.

Alternatively, you can receive a daily email with Geekzone updates.