legohead6 Posted February 21, 2007 Share Posted February 21, 2007 how do i do this? Link to comment https://forums.phpfreaks.com/topic/39413-correcting-time-to-local-time/ Share on other sites More sharing options...
legohead6 Posted February 21, 2007 Author Share Posted February 21, 2007 like taking the date(); function and subtract hours and minutes? Link to comment https://forums.phpfreaks.com/topic/39413-correcting-time-to-local-time/#findComment-190117 Share on other sites More sharing options...
tom100 Posted February 21, 2007 Share Posted February 21, 2007 Are you trying to get the users local time? If so, you will need to get the users timezone or use javascript. Link to comment https://forums.phpfreaks.com/topic/39413-correcting-time-to-local-time/#findComment-190125 Share on other sites More sharing options...
legohead6 Posted February 21, 2007 Author Share Posted February 21, 2007 no change the hole site to my local time Link to comment https://forums.phpfreaks.com/topic/39413-correcting-time-to-local-time/#findComment-190194 Share on other sites More sharing options...
Jessica Posted February 21, 2007 Share Posted February 21, 2007 You'd have to change the server's time - if you're on a shared server, you won't be able to. You could just make sure to subtract/add the right number of seconds to any timestamp, or just use the time it's on... Link to comment https://forums.phpfreaks.com/topic/39413-correcting-time-to-local-time/#findComment-190204 Share on other sites More sharing options...
legohead6 Posted February 21, 2007 Author Share Posted February 21, 2007 how do i add /subtract from a timestamp? Link to comment https://forums.phpfreaks.com/topic/39413-correcting-time-to-local-time/#findComment-190210 Share on other sites More sharing options...
Jessica Posted February 21, 2007 Share Posted February 21, 2007 $time = time(); $time = $time-(3600); // One hour earlier. Link to comment https://forums.phpfreaks.com/topic/39413-correcting-time-to-local-time/#findComment-190215 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.