nixCraft Linux Forum

nixCraft

Linux Tech Support Forum

PHP Change TZ Timezone on shared Linux server

This is a discussion on PHP Change TZ Timezone on shared Linux server within the CentOS / RHEL / Fedora forums, part of the Linux Distribution category; Hi There, I hope someone can help or at least indicate where this problem may lie: Situation: CentOS 5 server ...


Go Back   nixCraft Linux Forum > Linux Distribution > CentOS / RHEL / Fedora

Register FAQ Members List Calendar Mark Forums Read
  #1 (permalink)  
Old 05-26-2008, 09:17 AM
Junior Member
User
 
Join Date: May 2008
My distro: Debian
Posts: 1
Rep Power: 0
cmebd is on a distinguished road
Default PHP Change TZ Timezone on shared Linux server

Hi There,

I hope someone can help or at least indicate where this problem may lie:

Situation: CentOS 5 server running php, mysql, apache (latest), etc etc.

This is a "shared hosting" server in the US - I am in Australia and am developing a website for an Australian company. I have used the TZ time zone in .htaccess to change/calculate local timezone however nothing appears to help the situation.

I do not have root access to the server (obviously) and support have done all that they are aware of to try and help with this issue - we havn't found anything that works up to now.

Wouldn't matter so much but site is a shop therefore sales/timestamps are very important.

Any help is more than appreciated - if someone has the answer that's great even a pointer to a resolution would be fantastic.

Cheers
Reply With Quote
Sponsored Links
  #2 (permalink)  
Old 05-27-2008, 09:07 AM
nixcraft's Avatar
Never say die
User
 
Join Date: Jan 2005
Location: BIOS
My distro: Any distro with shell
Posts: 910
Rep Power: 10
nixcraft has a reputation beyond repute nixcraft has a reputation beyond repute nixcraft has a reputation beyond repute nixcraft has a reputation beyond repute nixcraft has a reputation beyond repute nixcraft has a reputation beyond repute nixcraft has a reputation beyond repute nixcraft has a reputation beyond repute nixcraft has a reputation beyond repute nixcraft has a reputation beyond repute nixcraft has a reputation beyond repute
Default

You need root access to change timezone. For accessing and setting environment variable use php putenv()
Code:
putenv ('TZ=Europe/Amsterdam'); 
mktime(0,0,0,1,1,1970);
echo date("H:i:s");
See PHP: putenv - Manual
__________________
Vivek | My personal blog
Linux Evangelist
Play hard stay cool

Last edited by nixcraft; 05-27-2008 at 09:09 AM.
Reply With Quote
Reply

Bookmarks


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)

 
Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On

Similar Threads

Thread Thread Starter Forum Replies Last Post
OpenBSD configure change DNS name server IP address - DNS Client Resolution rockdalinux Getting started tutorials 0 06-15-2007 10:14 PM
Howto change ip address in Linux chiku Networking, Firewalls and Security 1 04-29-2007 04:51 PM
mysql shared libraries shankar100 Web servers 1 02-20-2007 08:23 AM
set or how to change dns setting ubuntu linux network chiku Linux software 1 07-17-2006 06:30 PM
change password under linux Linux software 1 01-18-2006 07:38 PM


All times are GMT +5.5. The time now is 04:47 AM.


Powered by vBulletin® Version 3.7.2 - Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Search Engine Optimization by vBSEO 3.2.0

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36