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
Ghoz
Forum Commoner
Posts: 38 Joined: Thu Jul 12, 2012 2:32 am
Post
by Ghoz » Thu Oct 18, 2012 9:52 pm
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');
requinix
Spammer :|
Posts: 6617 Joined: Wed Oct 15, 2008 2:35 am
Location: WA, USA
Post
by requinix » Thu Oct 18, 2012 10:00 pm
"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
Post
by Ghoz » Sat Oct 20, 2012 3:20 am
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
Post
by Ghoz » Mon Oct 22, 2012 3:52 am
Any suggestion anyone??
requinix
Spammer :|
Posts: 6617 Joined: Wed Oct 15, 2008 2:35 am
Location: WA, USA
Post
by requinix » Mon Oct 22, 2012 4:11 am
So your question really is about how to choose your timezone?
Ghoz
Forum Commoner
Posts: 38 Joined: Thu Jul 12, 2012 2:32 am
Post
by Ghoz » Mon Oct 22, 2012 9:09 am
Still waiting for a good answer, anyone??
requinix
Spammer :|
Posts: 6617 Joined: Wed Oct 15, 2008 2:35 am
Location: WA, USA
Post
by requinix » Mon Oct 22, 2012 12:23 pm
Ghoz wrote: Still waiting for a good answer, anyone??
Still waiting for a clarification what the question is, anyone??
Benjamin
Site Administrator
Posts: 6935 Joined: Sun May 19, 2002 10:24 pm
Post
by Benjamin » Mon Oct 22, 2012 12:28 pm
Ghoz, is the time correct in the database?