jwk811 Posted November 25, 2006 Share Posted November 25, 2006 i am using the date function but the time is two hours before mine so its obviously not the right time zone.. how can i make it find the right time zone? thanks for the help! Quote Link to comment Share on other sites More sharing options...
The Little Guy Posted November 25, 2006 Share Posted November 25, 2006 Do you want to post your code? Quote Link to comment Share on other sites More sharing options...
jwk811 Posted November 25, 2006 Author Share Posted November 25, 2006 the date function like this[code]<?php echo date("g:i:s"); ?>[/code]i need it to come up in my time zonethanks~~ Quote Link to comment Share on other sites More sharing options...
The Little Guy Posted November 25, 2006 Share Posted November 25, 2006 [code]<?php$hour = date(g) - 2;echo date($hour.":i:s"); ?>[/code] Quote Link to comment Share on other sites More sharing options...
heckenschutze Posted November 25, 2006 Share Posted November 25, 2006 Something like:[code]$MyTime = date("g i", time() + 7200);[/code]Of course, you'll have to change it depending on the date format used :) Quote Link to comment Share on other sites More sharing options...
heckenschutze Posted November 25, 2006 Share Posted November 25, 2006 @The Little Guyg is not a constant, therefore [color=blue]date(g[/color]) will fail, provided PHP is set to strict warnings / errors.Should be [color=blue]date('g')[/color] Quote Link to comment Share on other sites More sharing options...
marcus Posted November 25, 2006 Share Posted November 25, 2006 Yeah, you'll have to change by seconds, not by just 2. Quote Link to comment Share on other sites More sharing options...
The Little Guy Posted November 25, 2006 Share Posted November 25, 2006 sorry I forgot the quotes, otherwise it will work. Quote Link to comment Share on other sites More sharing options...
jwk811 Posted November 25, 2006 Author Share Posted November 25, 2006 thanks! the one heckenschutze showed worked 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.