Timezone

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
Ghoz
Forum Commoner
Posts: 38
Joined: Thu Jul 12, 2012 2:32 am

Timezone

Post by Ghoz »

Hi,
Something wrong with my timezone. Sometimes it works but at other times not (for example 'submitted 12 hours ago'). Please help.
Thanks!

Code: Select all

date_default_timezone_set('xxx/yyy');
User avatar
requinix
Spammer :|
Posts: 6617
Joined: Wed Oct 15, 2008 2:35 am
Location: WA, USA

Re: Timezone

Post by requinix »

"xxx/yyy" is not a valid timezone. You need to change it to something that is.
Ghoz
Forum Commoner
Posts: 38
Joined: Thu Jul 12, 2012 2:32 am

Re: Timezone

Post by Ghoz »

I put xxx & yyy because I don't want to show the location. I knew it is something like

Code: Select all

date_default_timezone_set('America/Mexico_City');
May be the problem is related to my server's time zone. How to choose which time zone to use?? I guest it is by my location, but sometimes it works but at other times not.
Ghoz
Forum Commoner
Posts: 38
Joined: Thu Jul 12, 2012 2:32 am

Re: Timezone

Post by Ghoz »

Any suggestion anyone??
User avatar
requinix
Spammer :|
Posts: 6617
Joined: Wed Oct 15, 2008 2:35 am
Location: WA, USA

Re: Timezone

Post by requinix »

So your question really is about how to choose your timezone?
Ghoz
Forum Commoner
Posts: 38
Joined: Thu Jul 12, 2012 2:32 am

Re: Timezone

Post by Ghoz »

Still waiting for a good answer, anyone??
User avatar
requinix
Spammer :|
Posts: 6617
Joined: Wed Oct 15, 2008 2:35 am
Location: WA, USA

Re: Timezone

Post by requinix »

Ghoz wrote:Still waiting for a good answer, anyone??
Still waiting for a clarification what the question is, anyone??
User avatar
Benjamin
Site Administrator
Posts: 6935
Joined: Sun May 19, 2002 10:24 pm

Re: Timezone

Post by Benjamin »

Ghoz, is the time correct in the database?
Post Reply