My hosting server is located in Texas and when I use the localtime() function, I get Texas local time rather than Massachusetts local time (where I currently reside). I want to standardize all my time information so that when I store it into the MySQL database, I store GMT rather than any localtime, and always do a timezone adjustment when pulling it out. I know there is a time() function which returns the number of seconds since Jan 01, 1970, but the problem with that is, I don't know if there's a way to format that into a readable time/date or whether time() returns the localtime or Greenwich Mean Time. What is the best way to do this? Also, what is the best way to store timestamps?
davidianstyle 0 Newbie Poster
masijade 1,351 Industrious Poster Team Colleague Featured Poster
davidianstyle 0 Newbie Poster
masijade 1,351 Industrious Poster Team Colleague Featured Poster
davidianstyle 0 Newbie Poster
Be a part of the DaniWeb community
We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.