jwk811 Posted May 10, 2009 Share Posted May 10, 2009 DATE_FORMAT(user_last_login,'%b %d %Y %h:%i %p') this is how i get the date from the database. i put the date into the database using the NOW() function i need it to either go in 5 hours less or come out 5 hours less, i think thats what it is. i am trying to get EST. default is GMT. ive been looking everywhere ugh please help. that is mysql by the way but maybe i can use php for this? Quote Link to comment https://forums.phpfreaks.com/topic/157609-date-time-zone/ Share on other sites More sharing options...
Ken2k7 Posted May 10, 2009 Share Posted May 10, 2009 There is SUBTIME. You probably want something like ... SUBTIME(user_last_login, '5:0:0') ... Hopefully that works. Quote Link to comment https://forums.phpfreaks.com/topic/157609-date-time-zone/#findComment-831113 Share on other sites More sharing options...
fenway Posted May 11, 2009 Share Posted May 11, 2009 You can also use "NOW() - INTERVAL 5 HOUR".. Quote Link to comment https://forums.phpfreaks.com/topic/157609-date-time-zone/#findComment-831560 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.