views:

73

answers:

1

hi,

i am running a site and i need to set the timezone. which is the most preferable time zone?? my server is in GoDaddy.com. So any one help me to set the time zone via php.

+1  A: 

See date_default_timezone_set

As for the time zone: That depends on the nature of your site, I would say.

  • You could have the user choose their time zone - nice e.g. for a personalized web app.
  • You could set it to the server's time zone - if you don't care
  • You could set it to the time zone where your business or user community is located - makes most sense with business sites and localized communities
  • You could set it to UTC, as Stack Overflow does. Makes probably the most sense when operating for a global audience, so that things don't get up in inter-user communication ("but in your comment at 2:21 you said...")
Pekka
is mysql now() is okey for non personalised websites??
coderex
What do you mean by "okay"? You may want to add more information about what you are trying to do.
Pekka