cluce Posted August 22, 2007 Share Posted August 22, 2007 Can someone please tell me how to alter this to display in CST time. I looked in the manual but it is not clear on how to do this. I know its not hard. I just never did it before. this is what I have.... echo date("F j, Y, g:i a"); //(ex.)March 10, 2001, 5:16 pm Quote Link to comment Share on other sites More sharing options...
Barand Posted August 22, 2007 Share Posted August 22, 2007 You could try something like $timeDiff = 1; // time diff between server time and CST echo date("F j, Y, g:i a", strtotime("-$timeDiff hours")); Quote Link to comment Share on other sites More sharing options...
cluce Posted August 23, 2007 Author Share Posted August 23, 2007 thanks. I also found another way to... I can use this putenv("TZ=US/Central"); Quote Link to comment Share on other sites More sharing options...
cluce Posted August 23, 2007 Author Share Posted August 23, 2007 here is the mysql way to change the timezone DATE_ADD(NOW(), INTERVAL 2 HOUR) Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.